tiling: Exclude maximized windows from input/render

This commit is contained in:
Victoria Brekenfeld 2025-03-07 17:36:11 +01:00 committed by Victoria Brekenfeld
parent 24bf2e856a
commit 8a32571b8a
2 changed files with 15 additions and 0 deletions

View file

@ -3160,6 +3160,9 @@ impl TilingLayout {
if !mapped.bbox().contains((location - geo.loc).as_logical()) {
continue;
}
if mapped.is_maximized(false) {
continue;
}
if let Some((target, surface_offset)) = mapped.focus_under(
(location_f64 - geo.loc.to_f64()).as_logical() + mapped.geometry().loc.to_f64(),
WindowSurfaceType::POPUP | WindowSurfaceType::SUBSURFACE,
@ -3190,6 +3193,9 @@ impl TilingLayout {
if !mapped.bbox().contains((location - geo.loc).as_logical()) {
continue;
}
if mapped.is_maximized(false) {
continue;
}
if let Some((target, surface_offset)) = mapped.focus_under(
(location_f64 - geo.loc.to_f64()).as_logical() + mapped.geometry().loc.to_f64(),
WindowSurfaceType::TOPLEVEL | WindowSurfaceType::SUBSURFACE,
@ -5045,6 +5051,7 @@ fn render_old_tree(
_ => unreachable!(),
},
)
.filter(|(mapped, _, _, _)| !mapped.is_maximized(false))
.filter(|(mapped, _, _, _)| {
if let Some(root) = target_tree.root_node_id() {
is_swap_mode
@ -5707,6 +5714,11 @@ fn render_new_tree(
(new_geo, percentage, false)
};
if let Data::Mapped { mapped, .. } = data {
if mapped.is_maximized(false) {
return;
}
}
processor(node_id, data, geo, original_geo, alpha, animating)
});
}

View file

@ -1107,6 +1107,9 @@ impl Workspace {
pub fn node_desc(&self, focus: KeyboardFocusTarget) -> Option<NodeDesc> {
match focus {
KeyboardFocusTarget::Element(mapped) => {
if mapped.is_maximized(false) {
return None;
}
self.tiling_layer.mapped().find_map(|(m, _)| {
if m == &mapped {
mapped