From 2329cea5c9f27145cb45aa0d004f14d5020357ea Mon Sep 17 00:00:00 2001 From: Hojjat Date: Fri, 10 Jul 2026 18:50:45 -0600 Subject: [PATCH] fix: input to cropped tiled windows should be bound to the tile --- src/input/mod.rs | 7 ++++++- src/shell/layout/tiling/mod.rs | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/input/mod.rs b/src/input/mod.rs index 30e5d4f8..6398e184 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -788,7 +788,12 @@ impl State { let shell = self.common.shell.read(); State::element_under(global_position, &output, &shell, &seat) }; - if let Some(target) = under { + // Grabbing a tiling resize handle (the gap between tiles) must not change keyboard focus + let on_resize_fork = matches!( + seat.get_pointer().unwrap().current_focus(), + Some(PointerFocusTarget::ResizeFork(_)) + ); + if let Some(target) = under.filter(|_| !on_resize_fork) { if let Some(surface) = target.toplevel().map(Cow::into_owned) && seat.get_keyboard().unwrap().modifier_state().logo && !shortcuts_inhibited diff --git a/src/shell/layout/tiling/mod.rs b/src/shell/layout/tiling/mod.rs index 5b425948..67bf947f 100644 --- a/src/shell/layout/tiling/mod.rs +++ b/src/shell/layout/tiling/mod.rs @@ -3180,6 +3180,10 @@ impl TilingLayout { let location = location_f64.to_i32_round(); for (mapped, geo) in self.mapped() { + // Tiled windows are rendered cropped to their tile (`geo`), so input must be bound to the tile as well + if !geo.contains(location) { + continue; + } if !mapped.bbox().contains((location - geo.loc).as_logical()) { continue; } @@ -3244,6 +3248,10 @@ impl TilingLayout { if matches!(overview, OverviewMode::None) { for (mapped, geo) in self.mapped() { + // Tiled windows are rendered cropped to their tile (`geo`), so input must be bound to the tile as well + if !geo.contains(location) { + continue; + } if !mapped.bbox().contains((location - geo.loc).as_logical()) { continue; }