From afc6ad64190bbe02bc02585dbcabd4d690e9e9fe Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Wed, 27 Jul 2016 21:30:45 -0400 Subject: bugfix: cmd focus parent don't set focus above ws In the `focus parent` command, do not set focus above the workspace level. These containers are not meant to be focused. This prevents a crash on repeated `focus parent` commands. --- sway/focus.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sway/focus.c b/sway/focus.c index 9974ba6a..d2a1e0d6 100644 --- a/sway/focus.c +++ b/sway/focus.c @@ -67,6 +67,9 @@ bool move_focus(enum movement_direction direction) { swayc_t *new_view = get_swayc_in_direction(old_view, direction); if (!new_view) { return false; + } else if (new_view->type == C_ROOT || new_view->type == C_OUTPUT) { + sway_log(L_DEBUG, "Not setting focus above the workspace level"); + return false; } else if (direction == MOVE_PARENT) { return set_focused_container(new_view); } else if (config->mouse_warping) { -- cgit v1.2.3-54-g00ecf