summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 14:47:08 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 14:47:08 -0400
commit19c0ec6a08fd8462bc2060b657277250452eb2ba (patch)
treee75b0b5b064507ab7b5718bd39e6802aa56b9eed
parentFix key handling from wlc (diff)
downloadsway-19c0ec6a08fd8462bc2060b657277250452eb2ba.tar.gz
sway-19c0ec6a08fd8462bc2060b657277250452eb2ba.tar.zst
sway-19c0ec6a08fd8462bc2060b657277250452eb2ba.zip
Fix movement between outputs
-rw-r--r--sway/layout.c3
-rw-r--r--sway/movement.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/sway/layout.c b/sway/layout.c
index 918da9f0..20b5999c 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -244,6 +244,9 @@ void focus_view(swayc_t *view) {
244 } 244 }
245 while (view && view->type != C_VIEW) { 245 while (view && view->type != C_VIEW) {
246 view = view->focused; 246 view = view->focused;
247 if (view && view->type == C_OUTPUT) {
248 wlc_output_focus(view->handle);
249 }
247 } 250 }
248 if (view) { 251 if (view) {
249 wlc_view_set_state(view->handle, WLC_BIT_ACTIVATED, true); 252 wlc_view_set_state(view->handle, WLC_BIT_ACTIVATED, true);
diff --git a/sway/movement.c b/sway/movement.c
index de987679..12726392 100644
--- a/sway/movement.c
+++ b/sway/movement.c
@@ -28,7 +28,7 @@ bool move_focus(enum movement_direction direction) {
28 bool can_move = false; 28 bool can_move = false;
29 int diff = 0; 29 int diff = 0;
30 if (direction == MOVE_LEFT || direction == MOVE_RIGHT) { 30 if (direction == MOVE_LEFT || direction == MOVE_RIGHT) {
31 if (parent->layout == L_HORIZ) { 31 if (parent->layout == L_HORIZ || parent->type == C_ROOT) {
32 can_move = true; 32 can_move = true;
33 diff = direction == MOVE_LEFT ? -1 : 1; 33 diff = direction == MOVE_LEFT ? -1 : 1;
34 } 34 }
@@ -61,7 +61,7 @@ bool move_focus(enum movement_direction direction) {
61 sway_log(L_DEBUG, "Can't move at current level, moving up tree"); 61 sway_log(L_DEBUG, "Can't move at current level, moving up tree");
62 current = parent; 62 current = parent;
63 parent = parent->parent; 63 parent = parent->parent;
64 if (parent->type == C_ROOT) { 64 if (!parent) {
65 // Nothing we can do 65 // Nothing we can do
66 return false; 66 return false;
67 } 67 }