diff options
author | tcmal <me@aria.rip> | 2024-08-30 17:22:14 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-30 17:38:59 +0100 |
commit | 0178e6d6ee7782748c575cb1d058e82c6c1a9473 (patch) | |
tree | 0799483a21547d5675d8e07449d9dafb7c03e08c /src | |
parent | 8fc827a3b30de16b6adbf80abea3bc224d507268 (diff) |
Fix mouse grab not being released sometimes
Diffstat (limited to 'src')
-rw-r--r-- | src/buttons.rs | 2 | ||||
-rw-r--r-- | src/conn_info/mod.rs | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/buttons.rs b/src/buttons.rs index fc79fa6..050ec5f 100644 --- a/src/buttons.rs +++ b/src/buttons.rs @@ -97,6 +97,7 @@ impl WM<'_> { w: Window, mut f: impl FnMut(&mut Self, MotionNotifyEvent) -> Result<()>, ) -> Result<()> { + debug!("grabbing pointer for mouse movement tracking action"); self.conn .wait_for_reply(self.conn.send_request(&GrabPointer { owner_events: false, @@ -138,6 +139,7 @@ impl WM<'_> { } } + debug!("ending mouse movement tracking"); self.conn.send_request(&UngrabPointer { time: x::CURRENT_TIME, }); diff --git a/src/conn_info/mod.rs b/src/conn_info/mod.rs index 42f3955..e05d719 100644 --- a/src/conn_info/mod.rs +++ b/src/conn_info/mod.rs @@ -151,6 +151,7 @@ impl<'a> Connection<'a> { x::EventMask::SUBSTRUCTURE_REDIRECT | x::EventMask::SUBSTRUCTURE_NOTIFY | x::EventMask::BUTTON_PRESS + | x::EventMask::BUTTON_RELEASE | x::EventMask::ENTER_WINDOW | x::EventMask::FOCUS_CHANGE | x::EventMask::PROPERTY_CHANGE, |