diff options
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 9f85bac0..6263bfb0 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -164,6 +164,9 @@ void view_init_floating(struct sway_view *view) { view->border_left = view->border_right = true; container_set_geometry_from_floating_view(view->swayc); + + // Don't maximize floating windows + view_set_tiled(view, false); } void view_autoconfigure(struct sway_view *view) { @@ -275,6 +278,7 @@ void view_autoconfigure(struct sway_view *view) { view->y = y; view->width = width; view->height = height; + view_set_tiled(view, true); } void view_set_activated(struct sway_view *view, bool activated) { @@ -283,6 +287,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); + } +} + void view_set_fullscreen(struct sway_view *view, bool fullscreen) { if (view->is_fullscreen == fullscreen) { return; @@ -948,7 +959,7 @@ bool view_is_visible(struct sway_view *view) { // Check view isn't in a tabbed or stacked container on an inactive tab struct sway_seat *seat = input_manager_current_seat(input_manager); struct sway_container *container = view->swayc; - while (container->type != C_WORKSPACE) { + while (container->type != C_WORKSPACE && container->layout != L_FLOATING) { if (container->parent->layout == L_TABBED || container->parent->layout == L_STACKED) { if (seat_get_active_child(seat, container->parent) != container) { |