aboutsummaryrefslogtreecommitdiff
path: root/src/niri.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-02-10 13:11:50 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-02-10 07:29:33 -0800
commit963ff14ed025eeb5d6785dbcd4c073251ef7a9e9 (patch)
treee4d2c85b4d3c77dc46f1a20cce8feb462484e439 /src/niri.rs
parent96a3ded2ec74954e9432f4b84bc8e125851dfb9e (diff)
downloadniri-963ff14ed025eeb5d6785dbcd4c073251ef7a9e9.tar.gz
niri-963ff14ed025eeb5d6785dbcd4c073251ef7a9e9.tar.bz2
niri-963ff14ed025eeb5d6785dbcd4c073251ef7a9e9.zip
Store hit type in PointContents
Diffstat (limited to 'src/niri.rs')
-rw-r--r--src/niri.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/niri.rs b/src/niri.rs
index 96d52686..8710493c 100644
--- a/src/niri.rs
+++ b/src/niri.rs
@@ -455,7 +455,7 @@ pub struct PointContents {
// border around the window.
pub surface: Option<(WlSurface, Point<f64, Logical>)>,
// If surface belongs to a window, this is that window.
- pub window: Option<Window>,
+ pub window: Option<(Window, HitType)>,
// If surface belongs to a layer surface, this is that layer surface.
pub layer: Option<LayerSurface>,
}
@@ -2720,7 +2720,7 @@ impl Niri {
} else {
None
};
- (surface_and_pos, (Some(window.clone()), None))
+ (surface_and_pos, (Some((window.clone(), hit)), None))
})
};
@@ -5060,6 +5060,8 @@ impl Niri {
if let Some(window) = &new_focus.window {
if current_focus.window.as_ref() != Some(window) {
+ let (window, _) = window;
+
if !self.layout.should_trigger_focus_follows_mouse_on(window) {
return;
}