diff options
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r-- | sway/desktop/xdg_shell.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 46582204..1ed45a6b 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -406,27 +406,19 @@ static void handle_map(struct wl_listener *listener, void *data) { | |||
406 | view->natural_height = view->wlr_xdg_surface->surface->current.height; | 406 | view->natural_height = view->wlr_xdg_surface->surface->current.height; |
407 | } | 407 | } |
408 | 408 | ||
409 | view_map(view, view->wlr_xdg_surface->surface); | 409 | bool csd = false; |
410 | 410 | ||
411 | if (!view->xdg_decoration) { | 411 | if (!view->xdg_decoration) { |
412 | struct sway_server_decoration *deco = | 412 | struct sway_server_decoration *deco = |
413 | decoration_from_surface(xdg_surface->surface); | 413 | decoration_from_surface(xdg_surface->surface); |
414 | bool csd = !deco || deco->wlr_server_decoration->mode == | 414 | csd = !deco || deco->wlr_server_decoration->mode == |
415 | WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT; | 415 | WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT; |
416 | view_update_csd_from_client(view, csd); | ||
417 | } | ||
418 | 416 | ||
419 | if (xdg_surface->toplevel->client_pending.fullscreen) { | ||
420 | container_set_fullscreen(view->container, true); | ||
421 | arrange_workspace(view->container->workspace); | ||
422 | } else { | ||
423 | if (view->container->parent) { | ||
424 | arrange_container(view->container->parent); | ||
425 | } else if (view->container->workspace) { | ||
426 | arrange_workspace(view->container->workspace); | ||
427 | } | ||
428 | } | 417 | } |
429 | 418 | ||
419 | view_map(view, view->wlr_xdg_surface->surface, | ||
420 | xdg_surface->toplevel->client_pending.fullscreen, csd); | ||
421 | |||
430 | transaction_commit_dirty(); | 422 | transaction_commit_dirty(); |
431 | 423 | ||
432 | xdg_shell_view->commit.notify = handle_commit; | 424 | xdg_shell_view->commit.notify = handle_commit; |