summaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authoremersion <[email protected]>2018-08-19 09:21:55 +0100
committerGitHub <[email protected]>2018-08-19 09:21:55 +0100
commit2c91afbb34f649fcd4de690be5bedba4d989a7f0 (patch)
tree681f45a530a1f8d5966161291c3cb482e52edb6e /sway/tree/view.c
parent389d159c81502aa8b951895de11c3720bbd5ba7d (diff)
parent2b5a404ac920339a2b9ce32d4718272dee4668b9 (diff)
Merge pull request #2487 from RyanDwyer/workspace-floating-list
Replace hacky L_FLOATING container with a list
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 7a2c1950..b77a9bb2 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -531,7 +531,7 @@ static bool should_focus(struct sway_view *view) {
struct sway_container *parent = view->swayc->parent;
if (parent->type == C_WORKSPACE && prev_focus == parent) {
size_t num_children = parent->children->length +
- parent->sway_workspace->floating->children->length;
+ parent->sway_workspace->floating->length;
if (num_children == 1) {
return true;
}
@@ -557,7 +557,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) {
// If we're about to launch the view into the floating container, then
// launch it as a tiled view in the root of the workspace instead.
if (container_is_floating(target_sibling)) {
- target_sibling = target_sibling->parent->parent;
+ target_sibling = target_sibling->parent;
}
view->swayc = container_view_create(target_sibling, view);
@@ -1046,7 +1046,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 && container->layout != L_FLOATING) {
+ while (container->type != C_WORKSPACE) {
if (container->parent->layout == L_TABBED ||
container->parent->layout == L_STACKED) {
if (seat_get_active_child(seat, container->parent) != container) {