diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-06-27 17:53:13 +0100 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-06-30 11:10:47 +0100 |
commit | e0d0e8f840271ab12533cb16c9a7ccba237adcb3 (patch) | |
tree | a81bf679fc25f89cc09516e1920c4496b2e4c2f8 /sway/tree | |
parent | 53c4467573c782b71ab6616e78834b432530f8ed (diff) | |
download | sway-e0d0e8f840271ab12533cb16c9a7ccba237adcb3.tar.xz |
Revert "Don't unmaximize floating views"
This reverts commit 97672295ed50d1d6272876c4a3b6b5607cab05c6.
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 3 | ||||
-rw-r--r-- | sway/tree/view.c | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index af55a54e..d8d5c34a 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -943,6 +943,9 @@ void container_set_floating(struct sway_container *container, bool enable) { container_add_child(workspace, container); container->width = container->parent->width; container->height = container->parent->height; + if (container->type == C_VIEW) { + view_set_tiled(container->sway_view, true); + } container->is_sticky = false; container_reap_empty_recursive(workspace->sway_workspace->floating); } diff --git a/sway/tree/view.c b/sway/tree/view.c index de4ce2e6..98637c33 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -141,6 +141,9 @@ static void view_autoconfigure_floating(struct sway_view *view) { view->border_top = view->border_bottom = true; view->border_left = view->border_right = true; + // Don't maximize floating windows + view_set_tiled(view, false); + view_configure(view, lx, ly, width, height); } @@ -248,6 +251,7 @@ void view_autoconfigure(struct sway_view *view) { view->x = x; view->y = y; + view_set_tiled(view, true); view_configure(view, x, y, width, height); } @@ -257,6 +261,13 @@ void view_set_activated(struct sway_view *view, bool activated) { } } +void view_set_tiled(struct sway_view *view, bool tiled) { + view->border = tiled ? config->border : B_NONE; + if (view->impl->set_tiled) { + view->impl->set_tiled(view, tiled); + } +} + // Set fullscreen, but without IPC events or arranging windows. void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen) { if (view->is_fullscreen == fullscreen) { |