diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-09-12 16:48:29 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-09-12 16:48:29 +0300 |
| commit | 55a798bd8b44465a354c1bd7723d4ece855c362c (patch) | |
| tree | d84e0cbb8934bfbc243d70ff7ff39493b473484b /src/niri.rs | |
| parent | cdcd5a2835cd4d48d9b51cce4b94fbd1a6eb8b5c (diff) | |
| download | niri-55a798bd8b44465a354c1bd7723d4ece855c362c.tar.gz niri-55a798bd8b44465a354c1bd7723d4ece855c362c.tar.bz2 niri-55a798bd8b44465a354c1bd7723d4ece855c362c.zip | |
Prevent unintended focus-follows-mouse during workspace switch
Diffstat (limited to 'src/niri.rs')
| -rw-r--r-- | src/niri.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/niri.rs b/src/niri.rs index 7c87ecc5..9e432319 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -4570,6 +4570,10 @@ impl Niri { if let Some(window) = &new_focus.window { if current_focus.window.as_ref() != Some(window) { + if !self.layout.should_trigger_focus_follows_mouse_on(window) { + return; + } + if let Some(threshold) = ffm.max_scroll_amount { if self.layout.scroll_amount_to_activate(window) > threshold.0 { return; |
