diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-11-03 10:14:24 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-11-03 10:23:21 +0300 |
| commit | e0ebf1bdff06c38ae3cc9e3114b41572cb792dc0 (patch) | |
| tree | b3c8799cb7ad9a32e48ace0540b030e7397d4604 /src/niri.rs | |
| parent | 11633aef98fa7e7bfab42a85164377c9f4afd142 (diff) | |
| download | niri-e0ebf1bdff06c38ae3cc9e3114b41572cb792dc0.tar.gz niri-e0ebf1bdff06c38ae3cc9e3114b41572cb792dc0.tar.bz2 niri-e0ebf1bdff06c38ae3cc9e3114b41572cb792dc0.zip | |
Remove pointer_grab_ongoing in favor of checking the actual grab
Diffstat (limited to 'src/niri.rs')
| -rw-r--r-- | src/niri.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/niri.rs b/src/niri.rs index c3f267c2..dae46938 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -282,8 +282,6 @@ pub struct Niri { /// various tooltips from sticking around. pub pointer_hidden: bool, pub pointer_inactivity_timer: Option<RegistrationToken>, - // FIXME: this should be able to be removed once PointerFocus takes grabs into account. - pub pointer_grab_ongoing: bool, pub tablet_cursor_location: Option<Point<f64, Logical>>, pub gesture_swipe_3f_cumulative: Option<(f64, f64)>, pub vertical_wheel_tracker: ScrollTracker, @@ -1877,7 +1875,6 @@ impl Niri { pointer_contents: PointContents::default(), pointer_hidden: false, pointer_inactivity_timer: None, - pointer_grab_ongoing: false, tablet_cursor_location: None, gesture_swipe_3f_cumulative: None, vertical_wheel_tracker: ScrollTracker::new(120), @@ -4526,8 +4523,7 @@ impl Niri { let Some((surface, surface_loc)) = &self.pointer_contents.surface else { return; }; - - if self.pointer_grab_ongoing { + if Some(surface) != pointer.current_focus().as_ref() { return; } |
