fix: input to cropped tiled windows should be bound to the tile

This commit is contained in:
Hojjat 2026-07-10 18:50:45 -06:00 committed by Victoria Brekenfeld
parent b8807a541f
commit 2329cea5c9
2 changed files with 14 additions and 1 deletions

View file

@ -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

View file

@ -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;
}