aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-03-28 17:04:55 -0400
committerTony Crisci <tony@dubstepdish.com>2018-03-28 17:04:55 -0400
commit4ab88a533098ee22d2bcd037e07d0c3ede9464fd (patch)
treee54abec8048e06d262786b8fbdd03861140bac8f
parent0bfcce50a9e3fe8e06d225c69a686041311ae484 (diff)
xdg-positioner bugfix
-rw-r--r--types/wlr_xdg_shell_v6.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/types/wlr_xdg_shell_v6.c b/types/wlr_xdg_shell_v6.c
index 9b700b55..4b2cfc23 100644
--- a/types/wlr_xdg_shell_v6.c
+++ b/types/wlr_xdg_shell_v6.c
@@ -1717,7 +1717,7 @@ static void wlr_xdg_popup_v6_box_constraints(struct wlr_xdg_popup_v6 *popup,
static bool wlr_xdg_popup_v6_unconstrain_flip(struct wlr_xdg_popup_v6 *popup,
struct wlr_box *toplevel_box) {
int offset_x = 0, offset_y = 0;
- wlr_xdg_popup_v6_box_constraints(popup, toplevel_box, &offset_y, &offset_y);
+ wlr_xdg_popup_v6_box_constraints(popup, toplevel_box, &offset_x, &offset_y);
if (!offset_x && !offset_y) {
return true;
@@ -1727,7 +1727,7 @@ static bool wlr_xdg_popup_v6_unconstrain_flip(struct wlr_xdg_popup_v6 *popup,
(popup->positioner.constraint_adjustment &
WLR_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_X);
- bool flip_y = offset_x &&
+ bool flip_y = offset_y &&
(popup->positioner.constraint_adjustment &
WLR_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_Y);
@@ -1741,6 +1741,8 @@ static bool wlr_xdg_popup_v6_unconstrain_flip(struct wlr_xdg_popup_v6 *popup,
popup->geometry =
wlr_xdg_positioner_v6_get_geometry(&popup->positioner);
+ wlr_xdg_popup_v6_box_constraints(popup, toplevel_box, &offset_x, &offset_y);
+
if (!offset_x && !offset_y) {
// no longer constrained
return true;