From efecacacb12645181d41e91221ddcef44e8fcf60 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Fri, 7 Aug 2026 11:15:53 +1000 Subject: [PATCH] Ignore maximize/fullscreen requests before first commit GTK clients like geany send xdg_toplevel.set_maximized before their first commit. wlr_xdg_toplevel_set_maximized() schedules a configure, which asserts the surface is initialized and aborts the compositor. Guard the request handlers with the surface's initialized flag and let the commit handler apply maximization once the client has committed. --- tabbed-wlroots.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tabbed-wlroots.c b/tabbed-wlroots.c index 13ebac9..3391eba 100644 --- a/tabbed-wlroots.c +++ b/tabbed-wlroots.c @@ -435,14 +435,16 @@ static void handle_request_maximize(struct wl_listener *listener, void *data) { (void)data; struct tabbed_app *app = wl_container_of(listener, app, request_maximize); struct wlr_xdg_toplevel *toplevel = app->toplevel; - wlr_xdg_toplevel_set_maximized(toplevel, true); + if (toplevel->base->initialized) + wlr_xdg_toplevel_set_maximized(toplevel, true); } static void handle_request_fullscreen(struct wl_listener *listener, void *data) { (void)data; struct tabbed_app *app = wl_container_of(listener, app, request_fullscreen); struct wlr_xdg_toplevel *toplevel = app->toplevel; - wlr_xdg_toplevel_set_fullscreen(toplevel, false); + if (toplevel->base->initialized) + wlr_xdg_toplevel_set_fullscreen(toplevel, false); } static void handle_request_minimize(struct wl_listener *listener, void *data) {