I have an overlay window with a TouchArea with mouse-cursor: MouseCursor.default. The issue is the cursor that was set before the window spawns stays in place even after interacting with the overlay window.
e.g.:
- I am hovering over text in firefox
- My app's overlay window spawns near my cursor
- I hover over the window and click on it
- The mouse cursor stays as a text-select cursor the entire time
I inexperienced with slint/wayland, but I think the issue is in this conditional:
|
pub fn update_cursor(&mut self, mouse_cursor: MouseCursor, queue: &QueueHandle<SpellWin>) { |
|
if self.last_cursor_enter_serial.is_some() |
|
&& self.pointer.is_some() |
|
&& mouse_cursor != self.current_wayland_cursor |
|
{ |
but current_wayland_cursor gets initialized to MouseCursor::Default:
|
let pointer_state = PointerState { |
|
pointer: None, |
|
pointer_data: None, |
|
cursor_shape: cursor_manager, |
|
current_wayland_cursor: MouseCursor::Default, |
|
last_cursor_enter_serial: None, |
|
}; |
so update_cursor() always skips if we're going from non-default -> default cursor.
I think the condition should be amended to (or separated out) so that the cursor update occurs once the first time update_cursor() is called per window (app?)
Alternatively, would it be possible to grab the actual cursor type instead of initializing it to default? I assumed this isn't feasible (didn't check very hard), and I'm not sure it's the cleaner fix anyways
I have an overlay window with a TouchArea with
mouse-cursor: MouseCursor.default. The issue is the cursor that was set before the window spawns stays in place even after interacting with the overlay window.e.g.:
I inexperienced with slint/wayland, but I think the issue is in this conditional:
Spell/spell-framework/src/wayland_adapter/way_helper.rs
Lines 158 to 162 in 497ee55
but
current_wayland_cursorgets initialized toMouseCursor::Default:Spell/spell-framework/src/wayland_adapter.rs
Lines 178 to 184 in 497ee55
so
update_cursor()always skips if we're going from non-default -> default cursor.I think the condition should be amended to (or separated out) so that the cursor update occurs once the first time
update_cursor()is called per window (app?)Alternatively, would it be possible to grab the actual cursor type instead of initializing it to
default? I assumed this isn't feasible (didn't check very hard), and I'm not sure it's the cleaner fix anyways