aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c11
1 files changed, 11 insertions, 0 deletions
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) {