diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-27 23:00:10 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-27 23:00:10 +1000 |
commit | f16529e2588f5e71d6777f4c06dfb58b29308cd0 (patch) | |
tree | 4dbdf53fdb83d25971dcad0a8c575ca66a851ee5 /sway | |
parent | 21ff87d72b44604d348cf71da3175b85ac5b2f75 (diff) |
Remove server-decoration assumption if view supports xdg-decoration
Diffstat (limited to 'sway')
-rw-r--r-- | sway/desktop/xdg_shell.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 2680af64..a8b527a7 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -377,11 +377,13 @@ static void handle_map(struct wl_listener *listener, void *data) { view_map(view, view->wlr_xdg_surface->surface); - struct sway_server_decoration *deco = - decoration_from_surface(xdg_surface->surface); - bool csd = !deco || deco->wlr_server_decoration->mode == - WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT; - view_update_csd_from_client(view, csd); + if (!view->xdg_decoration) { + struct sway_server_decoration *deco = + decoration_from_surface(xdg_surface->surface); + bool csd = !deco || deco->wlr_server_decoration->mode == + WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT; + view_update_csd_from_client(view, csd); + } if (xdg_surface->toplevel->client_pending.fullscreen) { container_set_fullscreen(view->container, true); |