mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-12-01 18:55:02 +03:00
parent
6b6b02c27a
commit
c31d9ef417
@ -528,7 +528,7 @@ CBox CXDGPositionerRules::getPosition(const CBox& constraint, const Vector2D& pa
|
||||
bool success = predictedBox.inside(constraint);
|
||||
|
||||
if (success)
|
||||
return predictedBox;
|
||||
return predictedBox.translate(-parentCoord - constraint.pos());
|
||||
|
||||
if (state.constraintAdjustment & (XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X | XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y)) {
|
||||
// attempt to flip
|
||||
@ -547,7 +547,7 @@ CBox CXDGPositionerRules::getPosition(const CBox& constraint, const Vector2D& pa
|
||||
success = false;
|
||||
|
||||
if (success)
|
||||
return test;
|
||||
return test.translate(-parentCoord - constraint.pos());
|
||||
}
|
||||
|
||||
// if flips fail, we will slide and remember.
|
||||
@ -584,7 +584,7 @@ CBox CXDGPositionerRules::getPosition(const CBox& constraint, const Vector2D& pa
|
||||
success = test.copy().expand(-1).inside(constraint);
|
||||
|
||||
if (success)
|
||||
return test;
|
||||
return test.translate(-parentCoord - constraint.pos());
|
||||
}
|
||||
|
||||
if (state.constraintAdjustment & (XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X | XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y)) {
|
||||
@ -613,7 +613,7 @@ CBox CXDGPositionerRules::getPosition(const CBox& constraint, const Vector2D& pa
|
||||
success = test.copy().expand(-1).inside(constraint);
|
||||
|
||||
if (success)
|
||||
return test;
|
||||
return test.translate(-parentCoord - constraint.pos());
|
||||
}
|
||||
|
||||
LOGM(WARN, "Compositor/client bug: xdg_positioner couldn't find a place");
|
||||
|
Loading…
Reference in New Issue
Block a user