diff options
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 651a2be6..8548d9b8 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -458,7 +458,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) { | |||
458 | } | 458 | } |
459 | // If we're about to launch the view into the floating container, then | 459 | // If we're about to launch the view into the floating container, then |
460 | // launch it as a tiled view in the root of the workspace instead. | 460 | // launch it as a tiled view in the root of the workspace instead. |
461 | if (focus->is_floating) { | 461 | if (container_is_floating(focus)) { |
462 | focus = focus->parent->parent; | 462 | focus = focus->parent->parent; |
463 | } | 463 | } |
464 | free(criterias); | 464 | free(criterias); |
@@ -531,7 +531,7 @@ void view_unmap(struct sway_view *view) { | |||
531 | } | 531 | } |
532 | 532 | ||
533 | void view_update_position(struct sway_view *view, double lx, double ly) { | 533 | void view_update_position(struct sway_view *view, double lx, double ly) { |
534 | if (!view->swayc->is_floating) { | 534 | if (!container_is_floating(view->swayc)) { |
535 | return; | 535 | return; |
536 | } | 536 | } |
537 | container_damage_whole(view->swayc); | 537 | container_damage_whole(view->swayc); |
@@ -548,7 +548,7 @@ void view_update_size(struct sway_view *view, int width, int height) { | |||
548 | container_damage_whole(view->swayc); | 548 | container_damage_whole(view->swayc); |
549 | view->width = width; | 549 | view->width = width; |
550 | view->height = height; | 550 | view->height = height; |
551 | if (view->swayc->is_floating) { | 551 | if (container_is_floating(view->swayc)) { |
552 | container_set_geometry_from_view(view->swayc); | 552 | container_set_geometry_from_view(view->swayc); |
553 | } | 553 | } |
554 | container_damage_whole(view->swayc); | 554 | container_damage_whole(view->swayc); |
@@ -904,15 +904,15 @@ bool view_is_visible(struct sway_view *view) { | |||
904 | container_parent(view->swayc, C_WORKSPACE); | 904 | container_parent(view->swayc, C_WORKSPACE); |
905 | // Determine if view is nested inside a floating container which is sticky. | 905 | // Determine if view is nested inside a floating container which is sticky. |
906 | // A simple floating view will have this ancestry: | 906 | // A simple floating view will have this ancestry: |
907 | // C_VIEW (is_floating=true) -> floating -> workspace | 907 | // C_VIEW -> floating -> workspace |
908 | // A more complex ancestry could be: | 908 | // A more complex ancestry could be: |
909 | // C_VIEW -> C_CONTAINER (tabbed and is_floating) -> floating -> workspace | 909 | // C_VIEW -> C_CONTAINER (tabbed) -> floating -> workspace |
910 | struct sway_container *floater = view->swayc; | 910 | struct sway_container *floater = view->swayc; |
911 | while (floater->parent->type != C_WORKSPACE | 911 | while (floater->parent->type != C_WORKSPACE |
912 | && floater->parent->parent->type != C_WORKSPACE) { | 912 | && floater->parent->parent->type != C_WORKSPACE) { |
913 | floater = floater->parent; | 913 | floater = floater->parent; |
914 | } | 914 | } |
915 | bool is_sticky = floater->is_floating && floater->is_sticky; | 915 | bool is_sticky = container_is_floating(floater) && floater->is_sticky; |
916 | // Check view isn't in a tabbed or stacked container on an inactive tab | 916 | // Check view isn't in a tabbed or stacked container on an inactive tab |
917 | struct sway_seat *seat = input_manager_current_seat(input_manager); | 917 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
918 | struct sway_container *container = view->swayc; | 918 | struct sway_container *container = view->swayc; |