Merge pull request #2395 from hojjatabdollahi/hojjat/fix-fullscreen

fix: fullscreen x11 games opening as floating/tiled windows
This commit is contained in:
Levi Portenier 2026-05-21 10:27:06 -06:00 committed by GitHub
commit 6ebe2a1f04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -809,12 +809,14 @@ impl XwmHandler for State {
); );
} }
if !shell.pending_windows.iter().any(|w| w.surface == window) { if !shell.pending_windows.iter().any(|w| w.surface == window) {
let fullscreen = window.is_fullscreen().then(|| seat.active_output());
let maximized = window.is_maximized();
let surface = CosmicSurface::from(window); let surface = CosmicSurface::from(window);
shell.pending_windows.push(PendingWindow { shell.pending_windows.push(PendingWindow {
surface, surface,
seat, seat,
fullscreen: None, fullscreen,
maximized: false, maximized,
sticky: false, sticky: false,
}) })
} }
@ -914,7 +916,11 @@ impl XwmHandler for State {
// We only allow floating X11 windows to resize themselves. Nothing else // We only allow floating X11 windows to resize themselves. Nothing else
let shell = self.common.shell.read(); let shell = self.common.shell.read();
// TODO: Fullscreen if window.is_fullscreen() {
let _ = window.configure(None);
return;
}
if let Some(mapped) = shell if let Some(mapped) = shell
.element_for_surface(&window) .element_for_surface(&window)
.filter(|mapped| !mapped.is_minimized()) .filter(|mapped| !mapped.is_minimized())