From 0336bf3bde33e18600094d60204cd39cb2ecbd5d Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Sun, 9 Jan 2022 17:44:06 +0100 Subject: [PATCH] autocommit 2022-01-09 17:44:06 CET --- src/backends/xorg/mod.rs | 1 + src/ifs/wl_seat/mod.rs | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/backends/xorg/mod.rs b/src/backends/xorg/mod.rs index 6fec6ce0..9828dca3 100644 --- a/src/backends/xorg/mod.rs +++ b/src/backends/xorg/mod.rs @@ -757,6 +757,7 @@ impl EventLoopDispatcher for XorgBackend { impl WheelDispatcher for XorgBackend { fn dispatch(self: Rc) -> Result<(), Box> { self.render()?; + self.handle_events()?; Ok(()) } } diff --git a/src/ifs/wl_seat/mod.rs b/src/ifs/wl_seat/mod.rs index 68a9b51f..fd2f9d92 100644 --- a/src/ifs/wl_seat/mod.rs +++ b/src/ifs/wl_seat/mod.rs @@ -226,6 +226,7 @@ impl WlSeatGlobal { .await; } self.tl_pointer_event(tl, |p| p.motion(0, x, y)).await; + self.tl_pointer_event(tl, |p| p.frame()).await; } } @@ -247,16 +248,6 @@ impl WlSeatGlobal { if let NodeKind::Toplevel(tl) = kb_node.clone().into_kind() { self.tl_kb_event(&tl, |k| k.leave(0, tl.surface.surface.surface.id)) .await; - let ModifierState { - mods_depressed, - mods_latched, - mods_locked, - group, - } = self.kb_state.borrow().mods(); - self.tl_kb_event(&tl, |k| { - k.modifiers(0, mods_depressed, mods_latched, mods_locked, group) - }) - .await; } self.keyboard_node.set(node.clone()); } @@ -277,6 +268,16 @@ impl WlSeatGlobal { ) }) .await; + let ModifierState { + mods_depressed, + mods_latched, + mods_locked, + group, + } = self.kb_state.borrow().mods(); + self.tl_kb_event(&node, |k| { + k.modifiers(0, mods_depressed, mods_latched, mods_locked, group) + }) + .await; } } } @@ -290,6 +291,8 @@ impl WlSeatGlobal { }; self.tl_pointer_event(&node, |p| p.axis(0, axis, Fixed::from_int(delta))) .await; + self.tl_pointer_event(&node, |p| p.frame()) + .await; } } @@ -422,6 +425,9 @@ impl WlSeatObj { self.client .event(p.keymap(wl_keyboard::XKB_V1, p.keymap_fd()?, self.global.layout_size)) .await?; + self.client + .event(p.repeat_info(25, 250)) + .await?; Ok(()) }