forge
Explore
Log in

Don't you dare go Hollow

Store hit type in PointContents

Browse files at this commit

963ff14ed025eeb5d6785dbcd4c073251ef7a9e9Ivan MolodetskikhParent: 96a3ded
src/input/mod.rsmodified+2 -2
@@ -2451,7 +2451,7 @@ impl State {
24512451
24522452 if let Some(pos) = self.niri.tablet_cursor_location {
24532453 let under = self.niri.contents_under(pos);
2454- if let Some(window) = under.window {
2454+ if let Some((window, _)) = under.window {
24552455 self.niri.layout.activate_window(&window);
24562456
24572457 // FIXME: granular.
@@ -2823,7 +2823,7 @@ impl State {
28232823 let under = self.niri.contents_under(touch_location);
28242824
28252825 if !handle.is_grabbed() {
2826- if let Some(window) = under.window {
2826+ if let Some((window, _)) = under.window {
28272827 self.niri.layout.activate_window(&window);
28282828
28292829 // Check if we need to start an interactive move.
src/niri.rsmodified+4 -2
@@ -455,7 +455,7 @@ pub struct PointContents {
455455 // border around the window.
456456 pub surface: Option<(WlSurface, Point<f64, Logical>)>,
457457 // If surface belongs to a window, this is that window.
458- pub window: Option<Window>,
458+ pub window: Option<(Window, HitType)>,
459459 // If surface belongs to a layer surface, this is that layer surface.
460460 pub layer: Option<LayerSurface>,
461461 }
@@ -2720,7 +2720,7 @@ impl Niri {
27202720 } else {
27212721 None
27222722 };
2723- (surface_and_pos, (Some(window.clone()), None))
2723+ (surface_and_pos, (Some((window.clone(), hit)), None))
27242724 })
27252725 };
27262726
@@ -5060,6 +5060,8 @@ impl Niri {
50605060
50615061 if let Some(window) = &new_focus.window {
50625062 if current_focus.window.as_ref() != Some(window) {
5063+ let (window, _) = window;
5064+
50635065 if !self.layout.should_trigger_focus_follows_mouse_on(window) {
50645066 return;
50655067 }