From 7f515c54b399aef2c9e010e77ba91975e7f22928 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 14 Mar 2024 12:56:39 +1100 Subject: [PATCH] [client] x11/i3: fix fullscreen at launch via parameter/config --- client/displayservers/X11/x11.c | 7 ++++++- client/displayservers/X11/x11.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index 6ed9c582..bfa4c307 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -699,7 +699,7 @@ static bool x11Init(const LG_DSInitParams params) XMoveWindow(x11.display, x11.window, params.x, params.y); if (params.fullscreen) - x11SetFullscreen(true); + x11.doFullscreenOnExpose = true; XSetLocaleModifiers(""); // Load XMODIFIERS x11.xim = XOpenIM(x11.display, 0, 0, 0); @@ -946,6 +946,11 @@ static int x11EventThread(void * unused) { atomic_store(&x11.lastWMEvent, microtime()); x11.invalidateAll = true; + if (x11.doFullscreenOnExpose) + { + x11SetFullscreen(true); + x11.doFullscreenOnExpose = false; + } break; } diff --git a/client/displayservers/X11/x11.h b/client/displayservers/X11/x11.h index 287a0bd4..cb05e660 100644 --- a/client/displayservers/X11/x11.h +++ b/client/displayservers/X11/x11.h @@ -71,6 +71,7 @@ struct X11DSState _Atomic(uint64_t) lastWMEvent; bool invalidateAll; + bool doFullscreenOnExpose; int xpresentOp; bool jitRender;