mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 14:45:58 +01:00
fix direction determination
This commit is contained in:
parent
d2c7defa10
commit
9933b7ad95
1 changed files with 6 additions and 6 deletions
|
@ -442,17 +442,17 @@ struct wlr_output *wlr_output_layout_adjacent_output(
|
||||||
|
|
||||||
bool match = false;
|
bool match = false;
|
||||||
// test to make sure this output is in the given direction
|
// 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;
|
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;
|
match = box->x >= ref_box->x + ref_box->width || match;
|
||||||
}
|
}
|
||||||
if (direction | WLR_DIRECTION_UP) {
|
if (direction & WLR_DIRECTION_UP) {
|
||||||
match = box->y + box->height <= ref_box->y;
|
match = box->y + box->height <= ref_box->y || match;
|
||||||
}
|
}
|
||||||
if (direction | WLR_DIRECTION_DOWN) {
|
if (direction & WLR_DIRECTION_DOWN) {
|
||||||
match = box->y >= ref_box->y + ref_box->height;
|
match = box->y >= ref_box->y + ref_box->height || match;
|
||||||
}
|
}
|
||||||
if (!match) {
|
if (!match) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue