mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-09 15:05:58 +01:00
xdg-positioner bugfix
This commit is contained in:
parent
0bfcce50a9
commit
4ab88a5330
1 changed files with 4 additions and 2 deletions
|
@ -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,
|
static bool wlr_xdg_popup_v6_unconstrain_flip(struct wlr_xdg_popup_v6 *popup,
|
||||||
struct wlr_box *toplevel_box) {
|
struct wlr_box *toplevel_box) {
|
||||||
int offset_x = 0, offset_y = 0;
|
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) {
|
if (!offset_x && !offset_y) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -1727,7 +1727,7 @@ static bool wlr_xdg_popup_v6_unconstrain_flip(struct wlr_xdg_popup_v6 *popup,
|
||||||
(popup->positioner.constraint_adjustment &
|
(popup->positioner.constraint_adjustment &
|
||||||
WLR_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_X);
|
WLR_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_X);
|
||||||
|
|
||||||
bool flip_y = offset_x &&
|
bool flip_y = offset_y &&
|
||||||
(popup->positioner.constraint_adjustment &
|
(popup->positioner.constraint_adjustment &
|
||||||
WLR_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_Y);
|
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 =
|
popup->geometry =
|
||||||
wlr_xdg_positioner_v6_get_geometry(&popup->positioner);
|
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) {
|
if (!offset_x && !offset_y) {
|
||||||
// no longer constrained
|
// no longer constrained
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue