mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-26 21:58:08 +01:00
xdg_shell: don't send configure events to uninitialized surfaces
the surface isn't initialized yet when we first handle it in `handle_xdg_shell_toplevel`, move setting WM capabilities to handle_commit instead. Fixes warnings from wlroots about a configure being scheduled for uninitialized surface
This commit is contained in:
parent
5233a0bd2e
commit
fdcfe00781
1 changed files with 2 additions and 3 deletions
|
@ -289,6 +289,8 @@ static void handle_commit(struct wl_listener *listener, void *data) {
|
||||||
}
|
}
|
||||||
// XXX: https://github.com/swaywm/sway/issues/2176
|
// XXX: https://github.com/swaywm/sway/issues/2176
|
||||||
wlr_xdg_surface_schedule_configure(xdg_surface);
|
wlr_xdg_surface_schedule_configure(xdg_surface);
|
||||||
|
wlr_xdg_toplevel_set_wm_capabilities(view->wlr_xdg_toplevel,
|
||||||
|
XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN);
|
||||||
// TODO: wlr_xdg_toplevel_set_bounds()
|
// TODO: wlr_xdg_toplevel_set_bounds()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -575,7 +577,4 @@ void handle_xdg_shell_toplevel(struct wl_listener *listener, void *data) {
|
||||||
wlr_scene_xdg_surface_create(xdg_shell_view->view.content_tree, xdg_toplevel->base);
|
wlr_scene_xdg_surface_create(xdg_shell_view->view.content_tree, xdg_toplevel->base);
|
||||||
|
|
||||||
xdg_toplevel->base->data = xdg_shell_view;
|
xdg_toplevel->base->data = xdg_shell_view;
|
||||||
|
|
||||||
wlr_xdg_toplevel_set_wm_capabilities(xdg_toplevel,
|
|
||||||
XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue