diff options
author | random human <random.bored.human@gmail.com> | 2019-06-27 07:57:58 +0000 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-06-27 11:13:02 -0400 |
commit | 0ba959f1cebe58867cac31b95a1835b7b83370d4 (patch) | |
tree | 1c8d408e48ee545210512ca2faa54ee6c6ad8202 /sway/tree | |
parent | 5becce8005e3c617afbdddda8f0da95f84540b27 (diff) |
tree: set correct border value before creating floater
Diffstat (limited to 'sway/tree')
-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) { struct sway_container *old_parent = container->parent; container_detach(container); workspace_add_floating(workspace, container); - container_floating_set_default_size(container); - container_floating_resize_and_center(container); if (container->view) { view_set_tiled(container->view, false); if (container->view->using_csd) { container->border = B_CSD; } } + container_floating_set_default_size(container); + container_floating_resize_and_center(container); if (old_parent) { container_reap_empty(old_parent); } 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, &view->surface_new_subsurface); view->surface_new_subsurface.notify = view_handle_surface_new_subsurface; + if (decoration) { + view_update_csd_from_client(view, decoration); + } + if (view->impl->wants_floating && view->impl->wants_floating(view)) { view->container->border = config->floating_border; view->container->border_thickness = config->floating_border_thickness; @@ -635,10 +639,6 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface, view_update_title(view, false); container_update_representation(view->container); - if (decoration) { - view_update_csd_from_client(view, decoration); - } - if (fullscreen) { container_set_fullscreen(view->container, true); arrange_workspace(view->container->workspace); |