summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2016-07-27 21:30:45 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2016-07-27 21:30:45 -0400
commitafc6ad64190bbe02bc02585dbcabd4d690e9e9fe (patch)
tree65d901909525c6488bc4078904bde8bc3c2639b8
parentMerge pull request #787 from acrisci/bug/ipc-command-result-array (diff)
downloadsway-afc6ad64190bbe02bc02585dbcabd4d690e9e9fe.tar.gz
sway-afc6ad64190bbe02bc02585dbcabd4d690e9e9fe.tar.zst
sway-afc6ad64190bbe02bc02585dbcabd4d690e9e9fe.zip
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.
-rw-r--r--sway/focus.c3
1 files changed, 3 insertions, 0 deletions
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) {
67 swayc_t *new_view = get_swayc_in_direction(old_view, direction); 67 swayc_t *new_view = get_swayc_in_direction(old_view, direction);
68 if (!new_view) { 68 if (!new_view) {
69 return false; 69 return false;
70 } else if (new_view->type == C_ROOT || new_view->type == C_OUTPUT) {
71 sway_log(L_DEBUG, "Not setting focus above the workspace level");
72 return false;
70 } else if (direction == MOVE_PARENT) { 73 } else if (direction == MOVE_PARENT) {
71 return set_focused_container(new_view); 74 return set_focused_container(new_view);
72 } else if (config->mouse_warping) { 75 } else if (config->mouse_warping) {