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.
This commit is contained in:
parent
77cbf96ff2
commit
efecacacb1
1 changed files with 4 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue