diff options
-rw-r--r-- | sway/tree/container.c | 4 | ||||
-rw-r--r-- | sway/tree/view.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 89a47151..9046ae27 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -755,14 +755,14 @@ void container_set_floating(struct sway_container *container, bool enable) { | |||
755 | struct sway_container *old_parent = container->parent; | 755 | struct sway_container *old_parent = container->parent; |
756 | container_detach(container); | 756 | container_detach(container); |
757 | workspace_add_floating(workspace, container); | 757 | workspace_add_floating(workspace, container); |
758 | container_floating_set_default_size(container); | ||
759 | container_floating_resize_and_center(container); | ||
760 | if (container->view) { | 758 | if (container->view) { |
761 | view_set_tiled(container->view, false); | 759 | view_set_tiled(container->view, false); |
762 | if (container->view->using_csd) { | 760 | if (container->view->using_csd) { |
763 | container->border = B_CSD; | 761 | container->border = B_CSD; |
764 | } | 762 | } |
765 | } | 763 | } |
764 | container_floating_set_default_size(container); | ||
765 | container_floating_resize_and_center(container); | ||
766 | if (old_parent) { | 766 | if (old_parent) { |
767 | container_reap_empty(old_parent); | 767 | container_reap_empty(old_parent); |
768 | } | 768 | } |
diff --git a/sway/tree/view.c b/sway/tree/view.c index 4fd3a65a..f6d62ad6 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -612,6 +612,10 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface, | |||
612 | &view->surface_new_subsurface); | 612 | &view->surface_new_subsurface); |
613 | view->surface_new_subsurface.notify = view_handle_surface_new_subsurface; | 613 | view->surface_new_subsurface.notify = view_handle_surface_new_subsurface; |
614 | 614 | ||
615 | if (decoration) { | ||
616 | view_update_csd_from_client(view, decoration); | ||
617 | } | ||
618 | |||
615 | if (view->impl->wants_floating && view->impl->wants_floating(view)) { | 619 | if (view->impl->wants_floating && view->impl->wants_floating(view)) { |
616 | view->container->border = config->floating_border; | 620 | view->container->border = config->floating_border; |
617 | view->container->border_thickness = config->floating_border_thickness; | 621 | view->container->border_thickness = config->floating_border_thickness; |
@@ -635,10 +639,6 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface, | |||
635 | view_update_title(view, false); | 639 | view_update_title(view, false); |
636 | container_update_representation(view->container); | 640 | container_update_representation(view->container); |
637 | 641 | ||
638 | if (decoration) { | ||
639 | view_update_csd_from_client(view, decoration); | ||
640 | } | ||
641 | |||
642 | if (fullscreen) { | 642 | if (fullscreen) { |
643 | container_set_fullscreen(view->container, true); | 643 | container_set_fullscreen(view->container, true); |
644 | arrange_workspace(view->container->workspace); | 644 | arrange_workspace(view->container->workspace); |