diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-02-06 20:37:36 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-02-06 20:37:36 -0600 |
commit | 7b3eb7050186d477889b78afa36079fdb7a8ea3b (patch) | |
tree | 178acaf1073cf7e10b7a2e3c46944b4561b59b16 | |
parent | c215e8a3e1dae6c3f4789dd404d6266c39d9d2dd (diff) |
misc fixes to xdg-toplevel-decoration
-rw-r--r-- | dwl.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -759,6 +759,8 @@ commitnotify(struct wl_listener *listener, void *data) if (c->surface.xdg->initial_commit) { wlr_xdg_toplevel_set_wm_capabilities(c->surface.xdg->toplevel, WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN); wlr_xdg_toplevel_set_size(c->surface.xdg->toplevel, 0, 0); + if (c->decoration) + requestdecorationmode(&c->set_decoration_mode, c->decoration); return; } @@ -1052,6 +1054,7 @@ void destroydecoration(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, destroy_decoration); + c->decoration = NULL; wl_list_remove(&c->destroy_decoration.link); wl_list_remove(&c->set_decoration_mode.link); @@ -1929,8 +1932,9 @@ void requestdecorationmode(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, set_decoration_mode); - wlr_xdg_toplevel_decoration_v1_set_mode(c->decoration, - WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE); + if (c->surface.xdg->initialized) + wlr_xdg_toplevel_decoration_v1_set_mode(c->decoration, + WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE); } void |