diff --git a/window/src/os/wayland/pointer.rs b/window/src/os/wayland/pointer.rs index 4c059cd10..ebda5c1fb 100644 --- a/window/src/os/wayland/pointer.rs +++ b/window/src/os/wayland/pointer.rs @@ -325,6 +325,9 @@ impl PointerDispatcher { inner .surface_to_pending .insert(surface.as_ref().id(), Arc::clone(pending)); + if inner.active_surface_id == 0 { + inner.active_surface_id = surface.as_ref().id(); + } } pub fn set_cursor(&self, name: &str, serial: Option) {