From cdc8a988727ef11327ca69a6a9b5f67c9386a8e3 Mon Sep 17 00:00:00 2001 From: lutyjj <10267813+lutyjj@users.noreply.github.com> Date: Sat, 29 Aug 2026 07:43:24 +0000 Subject: [PATCH] fix: defer X11 resizing until fullscreen Mapping an X11 window immediately resized its outer geometry to the output. Decorated Wine windows could then expose a smaller rendering child, causing the WSI bypass geometry check to reject the surface. Preserve the requested geometry while mapping and enforce the output size through the existing fullscreen focus path. Apply that policy independently of game ID because classification can arrive after the fullscreen request. --- moonshine-core/src/session/compositor/handlers.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/moonshine-core/src/session/compositor/handlers.rs b/moonshine-core/src/session/compositor/handlers.rs index 9c38f219..781fd4f7 100644 --- a/moonshine-core/src/session/compositor/handlers.rs +++ b/moonshine-core/src/session/compositor/handlers.rs @@ -1285,7 +1285,7 @@ impl MoonshineCompositor { let Some(meta) = self.window_metadata.get(window) else { return; }; - if !meta.has_game_id() || !meta.is_fullscreen() { + if !meta.is_fullscreen() { return; } @@ -1884,17 +1884,12 @@ impl XwmHandler for MoonshineCompositor { target: "focus", title = ?window.title(), class = ?window.class(), + geometry = ?window.geometry(), override_redirect = window.is_override_redirect(), wl_surface = ?window.wl_surface(), "X11 window map request" ); - // Configure the X11 window to fill the output. - let geo = self.output_rect(); - if let Err(e) = window.configure(geo) { - tracing::warn!("Failed to configure X11 window geometry: {e}"); - } - // Grant the map request. if let Err(e) = window.set_mapped(true) { tracing::error!("Failed to set X11 window mapped: {e}");