[client] wayland: libdecor handles borderless

Added missing borderless functionality to libdecor_shellInit
when win:borderless is set to true
This works properly when going full screen as well
This commit is contained in:
Jonathan Rubenstein
2025-07-11 18:58:17 +03:00
committed by Geoffrey McRae
parent b7d044de5d
commit f7e0b9746a

View File

@@ -46,6 +46,7 @@ typedef struct LibDecorState
int32_t width, height; int32_t width, height;
bool needsResize; bool needsResize;
bool fullscreen; bool fullscreen;
bool borderless;
uint32_t resizeSerial; uint32_t resizeSerial;
} }
LibDecorState; LibDecorState;
@@ -147,6 +148,10 @@ static bool libdecor_shellInit(
if (maximize) if (maximize)
libdecor_frame_set_maximized(state.libdecorFrame); libdecor_frame_set_maximized(state.libdecorFrame);
if (borderless)
libdecor_frame_set_visibility(state.libdecorFrame, false);
state.borderless = borderless;
if (resizable) if (resizable)
libdecor_frame_set_capabilities(state.libdecorFrame, libdecor_frame_set_capabilities(state.libdecorFrame,
LIBDECOR_ACTION_RESIZE); LIBDECOR_ACTION_RESIZE);
@@ -183,7 +188,8 @@ static void libdecor_setFullscreen(bool fs)
else else
libdecor_frame_unset_fullscreen(state.libdecorFrame); libdecor_frame_unset_fullscreen(state.libdecorFrame);
libdecor_frame_set_visibility(state.libdecorFrame, !fs); if (!state.borderless)
libdecor_frame_set_visibility(state.libdecorFrame, !fs);
} }
static bool libdecor_getFullscreen(void) static bool libdecor_getFullscreen(void)