Browse Source

chore: enable `set_cursor_position` in Linux

It is not ready yet, but it has been pushed to tao
Lucas Nogueira 3 years ago
parent
commit
1303264190
3 changed files with 0 additions and 4 deletions
  1. 0 2
      core/tauri-runtime-wry/src/lib.rs
  2. 0 1
      core/tauri/src/window.rs
  3. 0 1
      tooling/api/src/window.ts

+ 0 - 2
core/tauri-runtime-wry/src/lib.rs

@@ -2278,9 +2278,7 @@ fn handle_user_message<T: UserEvent>(
           WindowMessage::SetCursorIcon(icon) => {
             window.set_cursor_icon(CursorIconWrapper::from(icon).0);
           }
-          #[allow(unused_variables)]
           WindowMessage::SetCursorPosition(position) => {
-            #[cfg(any(windows, target_os = "macos"))]
             let _ = window.set_cursor_position(PositionWrapper::from(position).0);
           }
           WindowMessage::DragWindow => {

+ 0 - 1
core/tauri/src/window.rs

@@ -1201,7 +1201,6 @@ impl<R: Runtime> Window<R> {
   ///
   /// ## Platform-specific
   ///
-  /// - **Linux:** Unsupported.
   /// - **Windows:** The cursor is only hidden within the confines of the window.
   /// - **macOS:** The cursor is hidden as long as the window has input focus, even if the cursor is
   ///   outside of the window.

+ 0 - 1
tooling/api/src/window.ts

@@ -1171,7 +1171,6 @@ class WindowManager extends WebviewWindowHandle {
    *
    * #### Platform-specific
    *
-   * - **Linux:** Unsupported.
    * - **Windows:** The cursor is only hidden within the confines of the window.
    * - **macOS:** The cursor is hidden as long as the window has input focus, even if the cursor is
    *   outside of the window.