diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-02-17 17:54:57 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-02-17 17:54:57 -0500 |
commit | 9933b7ad955204208ae6e72b23c6de8bea1e436c (patch) | |
tree | 248144d9c86dafa116d541bf679eee70407f5570 | |
parent | d2c7defa10797b6755904ee43d93bf1275d1777a (diff) |
fix direction determination
-rw-r--r-- | types/wlr_output_layout.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/types/wlr_output_layout.c b/types/wlr_output_layout.c index 24982e98..b1d0a130 100644 --- a/types/wlr_output_layout.c +++ b/types/wlr_output_layout.c @@ -442,17 +442,17 @@ struct wlr_output *wlr_output_layout_adjacent_output( bool match = false; // test to make sure this output is in the given direction - if (direction | WLR_DIRECTION_LEFT) { + if (direction & WLR_DIRECTION_LEFT) { match = box->x + box->width <= ref_box->x || match; } - if (direction | WLR_DIRECTION_RIGHT) { + if (direction & WLR_DIRECTION_RIGHT) { match = box->x >= ref_box->x + ref_box->width || match; } - if (direction | WLR_DIRECTION_UP) { - match = box->y + box->height <= ref_box->y; + if (direction & WLR_DIRECTION_UP) { + match = box->y + box->height <= ref_box->y || match; } - if (direction | WLR_DIRECTION_DOWN) { - match = box->y >= ref_box->y + ref_box->height; + if (direction & WLR_DIRECTION_DOWN) { + match = box->y >= ref_box->y + ref_box->height || match; } if (!match) { continue; |