From 52420cc24d61db8d22cf0d391f1f84b37bf087d5 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 16 Apr 2018 20:36:40 +1000 Subject: Implement fullscreen. --- sway/tree/layout.c | 18 ++++++++++++++++++ sway/tree/view.c | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) (limited to 'sway/tree') diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 0b637822..ae6db454 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -137,6 +137,21 @@ void container_move_to(struct sway_container *container, || container_has_anscestor(container, destination)) { return; } + + if (container->sway_view->is_fullscreen) { + struct sway_container *old_workspace = container; + if (old_workspace->type != C_WORKSPACE) { + old_workspace = container_parent(old_workspace, C_WORKSPACE); + } + struct sway_container *new_workspace = destination; + if (new_workspace->type != C_WORKSPACE) { + new_workspace = container_parent(new_workspace, C_WORKSPACE); + } + if (old_workspace != new_workspace) { + view_set_fullscreen(container->sway_view, false); + } + } + struct sway_container *old_parent = container_remove_child(container); container->width = container->height = 0; struct sway_container *new_parent; @@ -557,6 +572,9 @@ void arrange_windows(struct sway_container *container, return; case C_WORKSPACE: { + if (container->fullscreen) { + return; + } struct sway_container *output = container_parent(container, C_OUTPUT); struct wlr_box *area = &output->sway_output->usable_area; diff --git a/sway/tree/view.c b/sway/tree/view.c index 99b44720..b958233b 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -2,6 +2,7 @@ #include #include #include "log.h" +#include "sway/ipc-server.h" #include "sway/output.h" #include "sway/tree/container.h" #include "sway/tree/layout.h" @@ -73,7 +74,46 @@ void view_set_activated(struct sway_view *view, bool activated) { } } +void view_set_fullscreen(struct sway_view *view, bool fullscreen) { + if (view->is_fullscreen == fullscreen) { + return; + } + + struct sway_container *container = container_parent(view->swayc, C_OUTPUT); + struct sway_output *output = container->sway_output; + struct sway_container *workspace = container_parent(view->swayc, C_WORKSPACE); + + if (view->impl->set_fullscreen) { + view->impl->set_fullscreen(view, fullscreen); + } + + if (fullscreen) { + view->swayc->saved_x = view->swayc->x; + view->swayc->saved_y = view->swayc->y; + view->saved_width = view->width; + view->saved_height = view->height; + view_configure(view, 0, 0, output->wlr_output->width, output->wlr_output->height); + workspace->fullscreen = view; + } else { + view_configure(view, view->swayc->saved_x, view->swayc->saved_y, + view->saved_width, view->saved_height); + workspace->fullscreen = NULL; + } + + view->is_fullscreen = fullscreen; + output_damage_whole(output); + + arrange_windows(workspace, -1, -1); + + ipc_event_window(view->swayc, "fullscreen_mode"); +} + void view_close(struct sway_view *view) { + if (view->is_fullscreen) { + struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); + ws->fullscreen = NULL; + } + if (view->impl->close) { view->impl->close(view); } -- cgit v1.2.3 From bfd5834f4c1046c234ceaae212e65e045cd51460 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 17 Apr 2018 08:11:50 +1000 Subject: Feedback for fullscreen. --- sway/tree/layout.c | 2 +- sway/tree/view.c | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) (limited to 'sway/tree') diff --git a/sway/tree/layout.c b/sway/tree/layout.c index ae6db454..ad097f2e 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -138,7 +138,7 @@ void container_move_to(struct sway_container *container, return; } - if (container->sway_view->is_fullscreen) { + if (container->type == C_VIEW && container->sway_view->is_fullscreen) { struct sway_container *old_workspace = container; if (old_workspace->type != C_WORKSPACE) { old_workspace = container_parent(old_workspace, C_WORKSPACE); diff --git a/sway/tree/view.c b/sway/tree/view.c index b958233b..10285ad0 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -79,32 +79,26 @@ void view_set_fullscreen(struct sway_view *view, bool fullscreen) { return; } - struct sway_container *container = container_parent(view->swayc, C_OUTPUT); - struct sway_output *output = container->sway_output; struct sway_container *workspace = container_parent(view->swayc, C_WORKSPACE); + struct sway_container *container = container_parent(workspace, C_OUTPUT); + struct sway_output *output = container->sway_output; if (view->impl->set_fullscreen) { view->impl->set_fullscreen(view, fullscreen); } + view->is_fullscreen = fullscreen; + if (fullscreen) { - view->swayc->saved_x = view->swayc->x; - view->swayc->saved_y = view->swayc->y; - view->saved_width = view->width; - view->saved_height = view->height; - view_configure(view, 0, 0, output->wlr_output->width, output->wlr_output->height); workspace->fullscreen = view; + view_configure(view, 0, 0, output->wlr_output->width, output->wlr_output->height); } else { - view_configure(view, view->swayc->saved_x, view->swayc->saved_y, - view->saved_width, view->saved_height); workspace->fullscreen = NULL; + arrange_windows(workspace, -1, -1); } - view->is_fullscreen = fullscreen; output_damage_whole(output); - arrange_windows(workspace, -1, -1); - ipc_event_window(view->swayc, "fullscreen_mode"); } -- cgit v1.2.3 From c685ef081f090d1e15428f55426e02f2274312d0 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 17 Apr 2018 09:31:34 +1000 Subject: Create sway_workspace struct. --- sway/tree/container.c | 1 + sway/tree/layout.c | 18 +----------------- sway/tree/view.c | 7 ++++--- sway/tree/workspace.c | 7 +++++++ 4 files changed, 13 insertions(+), 20 deletions(-) (limited to 'sway/tree') diff --git a/sway/tree/container.c b/sway/tree/container.c index c0067493..f14e9b9a 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -197,6 +197,7 @@ static struct sway_container *container_workspace_destroy( } } + free(workspace->sway_workspace); _container_destroy(workspace); output_damage_whole(output->sway_output); diff --git a/sway/tree/layout.c b/sway/tree/layout.c index ad097f2e..62219bb1 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -572,7 +572,7 @@ void arrange_windows(struct sway_container *container, return; case C_WORKSPACE: { - if (container->fullscreen) { + if (container->sway_workspace->fullscreen) { return; } struct sway_container *output = @@ -847,22 +847,6 @@ struct sway_container *container_get_in_direction( } } - // TODO WLR fullscreen - /* - if (container->type == C_VIEW && swayc_is_fullscreen(container)) { - wlr_log(L_DEBUG, "Moving from fullscreen view, skipping to output"); - container = container_parent(container, C_OUTPUT); - get_layout_center_position(container, &abs_pos); - struct sway_container *output = - swayc_adjacent_output(container, dir, &abs_pos, true); - return get_swayc_in_output_direction(output, dir); - } - if (container->type == C_WORKSPACE && container->fullscreen) { - sway_log(L_DEBUG, "Moving to fullscreen view"); - return container->fullscreen; - } - */ - struct sway_container *wrap_candidate = NULL; while (true) { bool can_move = false; diff --git a/sway/tree/view.c b/sway/tree/view.c index 10285ad0..e7a267ec 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -7,6 +7,7 @@ #include "sway/tree/container.h" #include "sway/tree/layout.h" #include "sway/tree/view.h" +#include "sway/tree/workspace.h" void view_init(struct sway_view *view, enum sway_view_type type, const struct sway_view_impl *impl) { @@ -90,10 +91,10 @@ void view_set_fullscreen(struct sway_view *view, bool fullscreen) { view->is_fullscreen = fullscreen; if (fullscreen) { - workspace->fullscreen = view; + workspace->sway_workspace->fullscreen = view; view_configure(view, 0, 0, output->wlr_output->width, output->wlr_output->height); } else { - workspace->fullscreen = NULL; + workspace->sway_workspace->fullscreen = NULL; arrange_windows(workspace, -1, -1); } @@ -105,7 +106,7 @@ void view_set_fullscreen(struct sway_view *view, bool fullscreen) { void view_close(struct sway_view *view) { if (view->is_fullscreen) { struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); - ws->fullscreen = NULL; + ws->sway_workspace->fullscreen = NULL; } if (view->impl->close) { diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index 316f01e4..7f3c1903 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c @@ -59,6 +59,13 @@ struct sway_container *workspace_create(struct sway_container *output, workspace->layout = container_get_default_layout(output); workspace->workspace_layout = workspace->layout; + struct sway_workspace *swayws = calloc(1, sizeof(struct sway_workspace)); + if (!swayws) { + return NULL; + } + swayws->swayc = workspace; + workspace->sway_workspace = swayws; + container_add_child(output, workspace); container_sort_workspaces(output); container_create_notify(workspace); -- cgit v1.2.3 From cc4da245a8e4a746ebd379ca8dd6cc3b33ded8e4 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 17 Apr 2018 11:06:03 +1000 Subject: Fix views unmapping their own fullscreen windows. --- sway/tree/view.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sway/tree') diff --git a/sway/tree/view.c b/sway/tree/view.c index e7a267ec..fa27ec36 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -104,11 +104,6 @@ void view_set_fullscreen(struct sway_view *view, bool fullscreen) { } void view_close(struct sway_view *view) { - if (view->is_fullscreen) { - struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); - ws->sway_workspace->fullscreen = NULL; - } - if (view->impl->close) { view->impl->close(view); } @@ -232,6 +227,11 @@ void view_unmap(struct sway_view *view) { wl_signal_emit(&view->events.unmap, view); + if (view->is_fullscreen) { + struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); + ws->sway_workspace->fullscreen = NULL; + } + view_damage(view, true); wl_list_remove(&view->surface_new_subsurface.link); -- cgit v1.2.3 From 72beae209b03815e39d0aaa11348fa17c8a7bca9 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 18 Apr 2018 00:10:32 +1000 Subject: Fullscreen fixes. --- sway/tree/layout.c | 136 +++++++++++++++++++++++++++++++++++++++++++---------- sway/tree/view.c | 20 +++++++- 2 files changed, 130 insertions(+), 26 deletions(-) (limited to 'sway/tree') diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 62219bb1..d931c4dc 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -82,6 +82,37 @@ static int index_child(const struct sway_container *child) { return i; } +static void container_handle_fullscreen_reparent(struct sway_container *viewcon, + struct sway_container *old_parent) { + if (viewcon->type != C_VIEW || !viewcon->sway_view->is_fullscreen) { + return; + } + struct sway_view *view = viewcon->sway_view; + struct sway_container *old_workspace = old_parent; + if (old_workspace && old_workspace->type != C_WORKSPACE) { + old_workspace = container_parent(old_workspace, C_WORKSPACE); + } + struct sway_container *new_workspace = container_parent(view->swayc, + C_WORKSPACE); + if (old_workspace == new_workspace) { + return; + } + // Unmark the old workspace as fullscreen + if (old_workspace) { + old_workspace->sway_workspace->fullscreen = NULL; + } + + // Mark the new workspace as fullscreen + if (new_workspace->sway_workspace->fullscreen) { + view_set_fullscreen(new_workspace->sway_workspace->fullscreen, false); + } + new_workspace->sway_workspace->fullscreen = view; + // Resize view to new output dimensions + struct sway_output *output = new_workspace->parent->sway_output; + view_configure(view, 0, 0, + output->wlr_output->width, output->wlr_output->height); +} + void container_insert_child(struct sway_container *parent, struct sway_container *child, int i) { struct sway_container *old_parent = child->parent; @@ -91,6 +122,7 @@ void container_insert_child(struct sway_container *parent, wlr_log(L_DEBUG, "Inserting id:%zd at index %d", child->id, i); list_insert(parent->children, i, child); child->parent = parent; + container_handle_fullscreen_reparent(child, old_parent); wl_signal_emit(&child->events.reparent, old_parent); } @@ -106,6 +138,7 @@ struct sway_container *container_add_sibling(struct sway_container *fixed, int i = index_child(fixed); list_insert(parent->children, i + 1, active); active->parent = parent; + container_handle_fullscreen_reparent(active, old_parent); wl_signal_emit(&active->events.reparent, old_parent); return active->parent; } @@ -115,11 +148,18 @@ void container_add_child(struct sway_container *parent, wlr_log(L_DEBUG, "Adding %p (%d, %fx%f) to %p (%d, %fx%f)", child, child->type, child->width, child->height, parent, parent->type, parent->width, parent->height); + struct sway_container *old_parent = child->parent; list_add(parent->children, child); + container_handle_fullscreen_reparent(child, old_parent); child->parent = parent; } struct sway_container *container_remove_child(struct sway_container *child) { + if (child->type == C_VIEW && child->sway_view->is_fullscreen) { + struct sway_container *workspace = container_parent(child, C_WORKSPACE); + workspace->sway_workspace->fullscreen = NULL; + } + struct sway_container *parent = child->parent; for (int i = 0; i < parent->children->length; ++i) { if (parent->children->items[i] == child) { @@ -137,21 +177,6 @@ void container_move_to(struct sway_container *container, || container_has_anscestor(container, destination)) { return; } - - if (container->type == C_VIEW && container->sway_view->is_fullscreen) { - struct sway_container *old_workspace = container; - if (old_workspace->type != C_WORKSPACE) { - old_workspace = container_parent(old_workspace, C_WORKSPACE); - } - struct sway_container *new_workspace = destination; - if (new_workspace->type != C_WORKSPACE) { - new_workspace = container_parent(new_workspace, C_WORKSPACE); - } - if (old_workspace != new_workspace) { - view_set_fullscreen(container->sway_view, false); - } - } - struct sway_container *old_parent = container_remove_child(container); container->width = container->height = 0; struct sway_container *new_parent; @@ -179,6 +204,26 @@ void container_move_to(struct sway_container *container, arrange_windows(old_parent, -1, -1); } arrange_windows(new_parent, -1, -1); + // If view was moved to a fullscreen workspace, refocus the fullscreen view + struct sway_container *new_workspace = container; + if (new_workspace->type != C_WORKSPACE) { + new_workspace = container_parent(new_workspace, C_WORKSPACE); + } + if (new_workspace->sway_workspace->fullscreen) { + struct sway_seat *seat; + struct sway_container *focus, *focus_ws; + wl_list_for_each(seat, &input_manager->seats, link) { + focus = seat_get_focus(seat); + focus_ws = focus; + if (focus_ws->type != C_WORKSPACE) { + focus_ws = container_parent(focus_ws, C_WORKSPACE); + } + seat_set_focus(seat, new_workspace->sway_workspace->fullscreen->swayc); + if (focus_ws != new_workspace) { + seat_set_focus(seat, focus); + } + } + } } static bool sway_dir_to_wlr(enum movement_direction dir, @@ -283,6 +328,11 @@ void container_move(struct sway_container *container, struct sway_container *current = container; struct sway_container *parent = current->parent; + // If moving a fullscreen view, only consider outputs + if (container->type == C_VIEW && container->sway_view->is_fullscreen) { + current = container_parent(container, C_OUTPUT); + } + if (parent != container_flatten(parent)) { // Special case: we were the last one in this container, so flatten it // and leave @@ -546,6 +596,14 @@ void arrange_windows(struct sway_container *container, container->name, container->width, container->height, container->x, container->y); + if (container->type == C_WORKSPACE + && container->sway_workspace->fullscreen) { + struct wlr_output *wlr_output + = container->parent->sway_output->wlr_output; + view_configure(container->sway_workspace->fullscreen, 0, 0, + wlr_output->width, wlr_output->height); + } + double x = 0, y = 0; switch (container->type) { case C_ROOT: @@ -831,19 +889,27 @@ static struct sway_container *sway_output_from_wlr(struct wlr_output *output) { return NULL; } -struct sway_container *container_get_in_direction( +static struct sway_container *container_get_in_direction_naive( struct sway_container *container, struct sway_seat *seat, enum movement_direction dir) { - if (dir == MOVE_CHILD) { - return seat_get_focus_inactive(seat, container); - } - struct sway_container *parent = container->parent; - if (dir == MOVE_PARENT) { - if (parent->type == C_OUTPUT) { + + if (container->type == C_VIEW && container->sway_view->is_fullscreen) { + if (dir == MOVE_PARENT || dir == MOVE_CHILD) { return NULL; - } else { - return parent; + } + container = container_parent(container, C_OUTPUT); + parent = container->parent; + } else { + if (dir == MOVE_CHILD) { + return seat_get_focus_inactive(seat, container); + } + if (dir == MOVE_PARENT) { + if (parent->type == C_OUTPUT) { + return NULL; + } else { + return parent; + } } } @@ -932,6 +998,28 @@ struct sway_container *container_get_in_direction( } } +struct sway_container *container_get_in_direction( + struct sway_container *container, struct sway_seat *seat, + enum movement_direction dir) { + struct sway_container *result = container_get_in_direction_naive(container, + seat, dir); + if (!result) { + return NULL; + } + struct sway_container *old_workspace = container; + if (old_workspace->type != C_WORKSPACE) { + old_workspace = container_parent(old_workspace, C_WORKSPACE); + } + struct sway_container *new_workspace = result; + if (new_workspace->type != C_WORKSPACE) { + new_workspace = container_parent(new_workspace, C_WORKSPACE); + } + if (old_workspace != new_workspace && new_workspace->sway_workspace->fullscreen) { + result = new_workspace->sway_workspace->fullscreen->swayc; + } + return result; +} + struct sway_container *container_replace_child(struct sway_container *child, struct sway_container *new_child) { struct sway_container *parent = child->parent; diff --git a/sway/tree/view.c b/sway/tree/view.c index fa27ec36..b92c7099 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -91,13 +91,29 @@ void view_set_fullscreen(struct sway_view *view, bool fullscreen) { view->is_fullscreen = fullscreen; if (fullscreen) { + if (workspace->sway_workspace->fullscreen) { + view_set_fullscreen(workspace->sway_workspace->fullscreen, false); + } workspace->sway_workspace->fullscreen = view; - view_configure(view, 0, 0, output->wlr_output->width, output->wlr_output->height); + + struct sway_seat *seat; + struct sway_container *focus, *focus_ws; + wl_list_for_each(seat, &input_manager->seats, link) { + focus = seat_get_focus(seat); + focus_ws = focus; + if (focus_ws->type != C_WORKSPACE) { + focus_ws = container_parent(focus_ws, C_WORKSPACE); + } + seat_set_focus(seat, view->swayc); + if (focus_ws != workspace) { + seat_set_focus(seat, focus); + } + } } else { workspace->sway_workspace->fullscreen = NULL; - arrange_windows(workspace, -1, -1); } + arrange_windows(workspace, -1, -1); output_damage_whole(output); ipc_event_window(view->swayc, "fullscreen_mode"); -- cgit v1.2.3 From 35ccdd67a89280c1d906ed914d67918cfb382e1f Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 18 Apr 2018 08:35:28 +1000 Subject: More fullscreen fixes. * Render fullscreen views without wlr function, which makes popups and lockscreen work. * Don't allow input events to surfaces behind fullscreen views. * Use correct output dimensions (for rotated outputs). --- sway/tree/layout.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sway/tree') diff --git a/sway/tree/layout.c b/sway/tree/layout.c index d931c4dc..56d4e1d2 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -598,10 +598,8 @@ void arrange_windows(struct sway_container *container, if (container->type == C_WORKSPACE && container->sway_workspace->fullscreen) { - struct wlr_output *wlr_output - = container->parent->sway_output->wlr_output; view_configure(container->sway_workspace->fullscreen, 0, 0, - wlr_output->width, wlr_output->height); + container->parent->width, container->parent->height); } double x = 0, y = 0; -- cgit v1.2.3 From 7e38cc2e05f4a14a9e4043951b6fcc033cbb41c2 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 19 Apr 2018 12:50:53 +1000 Subject: arrange_windows(): Calculate workspace properties when fullscreen --- sway/tree/layout.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'sway/tree') diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 56d4e1d2..96d0c567 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -596,12 +596,6 @@ void arrange_windows(struct sway_container *container, container->name, container->width, container->height, container->x, container->y); - if (container->type == C_WORKSPACE - && container->sway_workspace->fullscreen) { - view_configure(container->sway_workspace->fullscreen, 0, 0, - container->parent->width, container->parent->height); - } - double x = 0, y = 0; switch (container->type) { case C_ROOT: @@ -628,9 +622,6 @@ void arrange_windows(struct sway_container *container, return; case C_WORKSPACE: { - if (container->sway_workspace->fullscreen) { - return; - } struct sway_container *output = container_parent(container, C_OUTPUT); struct wlr_box *area = &output->sway_output->usable_area; @@ -642,6 +633,11 @@ void arrange_windows(struct sway_container *container, container->y = y = area->y; wlr_log(L_DEBUG, "Arranging workspace '%s' at %f, %f", container->name, container->x, container->y); + if (container->sway_workspace->fullscreen) { + view_configure(container->sway_workspace->fullscreen, 0, 0, + output->width, output->height); + return; + } } // children are properly handled below break; -- cgit v1.2.3 From 45a2fad0dead2e00a41eedd3b524aacd29f00335 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 19 Apr 2018 12:53:02 +1000 Subject: container_get_in_direction(): Don't split this function --- sway/tree/layout.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) (limited to 'sway/tree') diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 96d0c567..7ffc2484 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -883,7 +883,7 @@ static struct sway_container *sway_output_from_wlr(struct wlr_output *output) { return NULL; } -static struct sway_container *container_get_in_direction_naive( +struct sway_container *container_get_in_direction( struct sway_container *container, struct sway_seat *seat, enum movement_direction dir) { struct sway_container *parent = container->parent; @@ -936,6 +936,14 @@ static struct sway_container *container_get_in_direction_naive( if (next == NULL) { return NULL; } + struct sway_container *next_workspace = next; + if (next_workspace->type != C_WORKSPACE) { + next_workspace = container_parent(next_workspace, C_WORKSPACE); + } + sway_assert(next_workspace, "Next container has no workspace"); + if (next_workspace->sway_workspace->fullscreen) { + return next_workspace->sway_workspace->fullscreen->swayc; + } if (next->children && next->children->length) { // TODO consider floating children as well return seat_get_focus_inactive_view(seat, next); @@ -992,28 +1000,6 @@ static struct sway_container *container_get_in_direction_naive( } } -struct sway_container *container_get_in_direction( - struct sway_container *container, struct sway_seat *seat, - enum movement_direction dir) { - struct sway_container *result = container_get_in_direction_naive(container, - seat, dir); - if (!result) { - return NULL; - } - struct sway_container *old_workspace = container; - if (old_workspace->type != C_WORKSPACE) { - old_workspace = container_parent(old_workspace, C_WORKSPACE); - } - struct sway_container *new_workspace = result; - if (new_workspace->type != C_WORKSPACE) { - new_workspace = container_parent(new_workspace, C_WORKSPACE); - } - if (old_workspace != new_workspace && new_workspace->sway_workspace->fullscreen) { - result = new_workspace->sway_workspace->fullscreen->swayc; - } - return result; -} - struct sway_container *container_replace_child(struct sway_container *child, struct sway_container *new_child) { struct sway_container *parent = child->parent; -- cgit v1.2.3