Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
fix: pan the viewport when focusing maximized windows, not just floating
Focus-follow panning was gated on TilingMode::Floating, so focusing a
maximized window (e.g. Electron apps that start maximized) never pulled
the viewport over even when the window was fully off-screen. Maximized
windows live at real desk-plane coordinates just like floating ones, so
widen the gate to both; fullscreen stays excluded (pinned to an output),
as do popups/overlays.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/server/seat.rs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/server/seat.rs b/src/server/seat.rs
index a57a9ae..532f1a0 100644
--- a/src/server/seat.rs
+++ b/src/server/seat.rs
@@ -419,7 +419,15 @@ impl Seat {
false
};
- if !window.is_null() && (*window).tiling_mode == crate::tiling::TilingMode::Floating {
+ // Floating AND maximized windows live at real desk-plane coordinates,
+ // so focus pans the viewport to either; fullscreen is pinned to an
+ // output and popups/overlays aren't desk citizens.
+ if !window.is_null()
+ && matches!(
+ (*window).tiling_mode,
+ crate::tiling::TilingMode::Floating | crate::tiling::TilingMode::Maximized
+ )
+ {
let app_id = (*window).get_app_id_string();
let is_cce_cloud = app_id.as_ref().map(|id| id == "cce-cloud").unwrap_or(false);
// A window newly on screen pulls the viewport over to it only when