mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
xdg-shell: fix popups rendered outside of the screen
Leave positioner inverted on the individual axis if it's no longer constrained. Otherwise constraint adjustment like `slide_x & flip_y` could render popup outside of the screen when both axes are constrained. Fixes Alexays/Waybar#532
This commit is contained in:
parent
3ff6a5def3
commit
c99d156f0d
2 changed files with 4 additions and 4 deletions
|
@ -454,10 +454,10 @@ static bool xdg_popup_unconstrain_flip(struct wlr_xdg_popup *popup,
|
|||
}
|
||||
|
||||
// revert the positioner back if it didn't fix it and go to the next part
|
||||
if (flip_x) {
|
||||
if (offset_x && flip_x) {
|
||||
wlr_positioner_invert_x(&popup->positioner);
|
||||
}
|
||||
if (flip_y) {
|
||||
if (offset_y && flip_y) {
|
||||
wlr_positioner_invert_y(&popup->positioner);
|
||||
}
|
||||
|
||||
|
|
|
@ -474,10 +474,10 @@ static bool xdg_popup_v6_unconstrain_flip(struct wlr_xdg_popup_v6 *popup,
|
|||
}
|
||||
|
||||
// revert the positioner back if it didn't fix it and go to the next part
|
||||
if (flip_x) {
|
||||
if (offset_x && flip_x) {
|
||||
wlr_positioner_v6_invert_x(&popup->positioner);
|
||||
}
|
||||
if (flip_y) {
|
||||
if (offset_y && flip_y) {
|
||||
wlr_positioner_v6_invert_y(&popup->positioner);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue