[client] wayland: fix fullscreen option launch bug

This commit is contained in:
Geoffrey McRae
2026-07-18 03:31:22 +10:00
parent acb5c06794
commit 47ade6395d
4 changed files with 33 additions and 7 deletions

View File

@@ -75,11 +75,7 @@ static void libdecorFrameConfigure(struct libdecor_frame * frame,
struct libdecor_configuration * configuration, void * opaque)
{
if (!state.configured)
{
xdg_surface_ack_configure(libdecor_frame_get_xdg_surface(frame), configuration->serial);
state.configured = true;
return;
}
int width, height;
if (libdecor_configuration_get_content_size(configuration, frame, &width, &height))
@@ -96,6 +92,12 @@ static void libdecorFrameConfigure(struct libdecor_frame * frame,
if (libdecor_configuration_get_window_state(configuration, &windowState))
state.fullscreen = windowState & LIBDECOR_WINDOW_STATE_FULLSCREEN;
if (!state.configured)
{
state.configured = true;
return;
}
state.resizeSerial = configuration->serial;
waylandNeedsResize();
}

View File

@@ -93,8 +93,13 @@ static const struct xdg_surface_listener xdgSurfaceListener = {
static void xdgToplevelConfigure(void * data, struct xdg_toplevel * xdgToplevel,
int32_t width, int32_t height, struct wl_array * states)
{
state.width = width;
state.height = height;
// A zero size means that the compositor is leaving the size up to us.
if (width > 0 && height > 0)
{
state.width = width;
state.height = height;
}
state.fullscreen = false;
state.floating = true;