summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-02-20 19:47:48 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-02-20 19:47:48 -0500
commitbcb870bcf2b31b4b03ef746bd60b74eb3ea9cb78 (patch)
treef0682b5ba94d969f8c52fe96aac6296e296f7cc9
parentuse wl_container_of() in output destroy callback (diff)
downloadsway-bcb870bcf2b31b4b03ef746bd60b74eb3ea9cb78.tar.gz
sway-bcb870bcf2b31b4b03ef746bd60b74eb3ea9cb78.tar.zst
sway-bcb870bcf2b31b4b03ef746bd60b74eb3ea9cb78.zip
bug: fix crash on focus up
-rw-r--r--sway/tree/layout.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 91f0f36f..3d04a1a7 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -421,7 +421,6 @@ static void get_layout_center_position(swayc_t *container, int *x, int *y) {
421} 421}
422 422
423static bool sway_dir_to_wlr(enum movement_direction dir, enum wlr_direction *out) { 423static bool sway_dir_to_wlr(enum movement_direction dir, enum wlr_direction *out) {
424 *out = 0;
425 switch (dir) { 424 switch (dir) {
426 case MOVE_UP: 425 case MOVE_UP:
427 *out = WLR_DIRECTION_UP; 426 *out = WLR_DIRECTION_UP;
@@ -436,10 +435,10 @@ static bool sway_dir_to_wlr(enum movement_direction dir, enum wlr_direction *out
436 *out = WLR_DIRECTION_RIGHT; 435 *out = WLR_DIRECTION_RIGHT;
437 break; 436 break;
438 default: 437 default:
439 break; 438 return false;
440 } 439 }
441 440
442 return *out != 0; 441 return true;
443} 442}
444 443
445static swayc_t *sway_output_from_wlr(struct wlr_output *output) { 444static swayc_t *sway_output_from_wlr(struct wlr_output *output) {