Commit 0d95cbee63c2
tarball1 file changed+8-1
@@ -6,7 +6,8 @@ use monolith_layout::{Rect, WindowId};
66
use smithay::backend::input::{ButtonState, InputTime, KeyState};77
use smithay::backend::session::Session;88
use smithay::input::keyboard::{FilterResult, Keycode, xkb};9
-use smithay::input::pointer::{AxisFrame, ButtonEvent, MotionEvent};9
+use smithay::input::pointer::{AxisFrame, ButtonEvent, CursorImageStatus, MotionEvent};10
+use smithay::reexports::wayland_server::Resource;1011
use smithay::utils::{Logical, Point, SERIAL_COUNTER};1112
use smithay::wayland::shell::wlr_layer::Layer;1213
@@ -22,6 +23,7 @@ impl State {
2223
};2324
focus_on_hover(self, pos, self.input.warping);2425
let under = self.surface_under(pos);26
+ let before = pointer.current_focus().and_then(|s| s.client());2527
pointer.motion(2628
self,2729
under,@@ -31,6 +33,11 @@ impl State {
3133
time,3234
},3335
);36
+ let after = pointer.current_focus().and_then(|s| s.client());37
+ if before.map(|c| c.id()) != after.map(|c| c.id()) {38
+ self.input.cursor_status = CursorImageStatus::default_named();39
+ self.dirty.redraw = true;40
+ }3441
}3542
3643
pub fn pointer_button(&mut self, button: u32, pressed: ButtonState, time: InputTime) {