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) { | |||
164 | view->border_left = view->border_right = true; | 164 | view->border_left = view->border_right = true; |
165 | 165 | ||
166 | container_set_geometry_from_floating_view(view->swayc); | 166 | container_set_geometry_from_floating_view(view->swayc); |
167 | |||
168 | // Don't maximize floating windows | ||
169 | view_set_tiled(view, false); | ||
167 | } | 170 | } |
168 | 171 | ||
169 | void view_autoconfigure(struct sway_view *view) { | 172 | void view_autoconfigure(struct sway_view *view) { |
@@ -275,6 +278,7 @@ void view_autoconfigure(struct sway_view *view) { | |||
275 | view->y = y; | 278 | view->y = y; |
276 | view->width = width; | 279 | view->width = width; |
277 | view->height = height; | 280 | view->height = height; |
281 | view_set_tiled(view, true); | ||
278 | } | 282 | } |
279 | 283 | ||
280 | void view_set_activated(struct sway_view *view, bool activated) { | 284 | void view_set_activated(struct sway_view *view, bool activated) { |
@@ -283,6 +287,13 @@ void view_set_activated(struct sway_view *view, bool activated) { | |||
283 | } | 287 | } |
284 | } | 288 | } |
285 | 289 | ||
290 | void view_set_tiled(struct sway_view *view, bool tiled) { | ||
291 | view->border = tiled ? config->border : B_NONE; | ||
292 | if (view->impl->set_tiled) { | ||
293 | view->impl->set_tiled(view, tiled); | ||
294 | } | ||
295 | } | ||
296 | |||
286 | void view_set_fullscreen(struct sway_view *view, bool fullscreen) { | 297 | void view_set_fullscreen(struct sway_view *view, bool fullscreen) { |
287 | if (view->is_fullscreen == fullscreen) { | 298 | if (view->is_fullscreen == fullscreen) { |
288 | return; | 299 | return; |
@@ -948,7 +959,7 @@ bool view_is_visible(struct sway_view *view) { | |||
948 | // Check view isn't in a tabbed or stacked container on an inactive tab | 959 | // Check view isn't in a tabbed or stacked container on an inactive tab |
949 | struct sway_seat *seat = input_manager_current_seat(input_manager); | 960 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
950 | struct sway_container *container = view->swayc; | 961 | struct sway_container *container = view->swayc; |
951 | while (container->type != C_WORKSPACE) { | 962 | while (container->type != C_WORKSPACE && container->layout != L_FLOATING) { |
952 | if (container->parent->layout == L_TABBED || | 963 | if (container->parent->layout == L_TABBED || |
953 | container->parent->layout == L_STACKED) { | 964 | container->parent->layout == L_STACKED) { |
954 | if (seat_get_active_child(seat, container->parent) != container) { | 965 | if (seat_get_active_child(seat, container->parent) != container) { |