diff options
author | 2024-07-04 03:01:25 +0530 | |
---|---|---|
committer | 2024-07-03 23:38:38 +0200 | |
commit | fdcfe00781d3ee31df99acb43ccd3873d2229809 (patch) | |
tree | afbb104ff828df6bd2a844d6501559719d52eac2 | |
parent | ipc: properly check for titlebars (diff) | |
download | sway-fdcfe00781d3ee31df99acb43ccd3873d2229809.tar.gz sway-fdcfe00781d3ee31df99acb43ccd3873d2229809.tar.zst sway-fdcfe00781d3ee31df99acb43ccd3873d2229809.zip |
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
-rw-r--r-- | sway/desktop/xdg_shell.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 7c417891..fdfa7b65 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -289,6 +289,8 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
289 | } | 289 | } |
290 | // XXX: https://github.com/swaywm/sway/issues/2176 | 290 | // XXX: https://github.com/swaywm/sway/issues/2176 |
291 | wlr_xdg_surface_schedule_configure(xdg_surface); | 291 | wlr_xdg_surface_schedule_configure(xdg_surface); |
292 | wlr_xdg_toplevel_set_wm_capabilities(view->wlr_xdg_toplevel, | ||
293 | XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN); | ||
292 | // TODO: wlr_xdg_toplevel_set_bounds() | 294 | // TODO: wlr_xdg_toplevel_set_bounds() |
293 | return; | 295 | return; |
294 | } | 296 | } |
@@ -575,7 +577,4 @@ void handle_xdg_shell_toplevel(struct wl_listener *listener, void *data) { | |||
575 | wlr_scene_xdg_surface_create(xdg_shell_view->view.content_tree, xdg_toplevel->base); | 577 | wlr_scene_xdg_surface_create(xdg_shell_view->view.content_tree, xdg_toplevel->base); |
576 | 578 | ||
577 | xdg_toplevel->base->data = xdg_shell_view; | 579 | xdg_toplevel->base->data = xdg_shell_view; |
578 | |||
579 | wlr_xdg_toplevel_set_wm_capabilities(xdg_toplevel, | ||
580 | XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN); | ||
581 | } | 580 | } |