diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-05-11 09:26:49 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-05-11 09:26:49 +0400 |
| commit | 2fd9a03bd71b4709659cdd35192109b47c3b0e10 (patch) | |
| tree | a419bad2e39ea38315e56e41e2cec1dbfca4b8f9 /src/niri.rs | |
| parent | b101f9b5f8acfb638f94962f76cbbb407d419664 (diff) | |
| download | niri-2fd9a03bd71b4709659cdd35192109b47c3b0e10.tar.gz niri-2fd9a03bd71b4709659cdd35192109b47c3b0e10.tar.bz2 niri-2fd9a03bd71b4709659cdd35192109b47c3b0e10.zip | |
Stop confining the pointer during resize grab
Diffstat (limited to 'src/niri.rs')
| -rw-r--r-- | src/niri.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/niri.rs b/src/niri.rs index a2ecd912..0fa95442 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -232,6 +232,8 @@ pub struct Niri { /// When this happens, the pointer also loses any focus. This is so that touch can prevent /// various tooltips from sticking around. pub pointer_hidden: bool, + // FIXME: this should be able to be removed once PointerFocus takes grabs into accound. + pub interactive_resize_ongoing: bool, pub tablet_cursor_location: Option<Point<f64, Logical>>, pub gesture_swipe_3f_cumulative: Option<(f64, f64)>, pub vertical_wheel_tracker: ScrollTracker, @@ -1502,6 +1504,7 @@ impl Niri { dnd_icon: None, pointer_focus: PointerFocus::default(), pointer_hidden: false, + interactive_resize_ongoing: false, tablet_cursor_location: None, gesture_swipe_3f_cumulative: None, vertical_wheel_tracker: ScrollTracker::new(120), @@ -3664,9 +3667,13 @@ impl Niri { let Some((surface, surface_loc)) = &new_under.surface else { return; }; + if self.interactive_resize_ongoing { + return; + } let pointer = &self.seat.get_pointer().unwrap(); with_pointer_constraint(surface, pointer, |constraint| { let Some(constraint) = constraint else { return }; + if constraint.is_active() { return; } |
