mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 13:35:57 +01:00
fix one pixel being off and annoying me
This commit is contained in:
parent
89024158a1
commit
0138a072ca
2 changed files with 5 additions and 1 deletions
|
@ -73,7 +73,8 @@
|
|||
free(error##name);
|
||||
|
||||
|
||||
#define VECTORDELTANONZERO(veca, vecb) ((int)abs(veca.x - vecb.x) > 0 || (int)abs(veca.y - vecb.y) > 0)
|
||||
#define VECTORDELTANONZERO(veca, vecb) (abs(veca.x - vecb.x) > 0.4f || abs(veca.y - vecb.y) > 0.4f)
|
||||
#define VECTORDELTAMORETHAN(veca, vecb, delta) (abs(veca.x - vecb.x) > (delta) || abs(veca.y - vecb.y) > (delta))
|
||||
|
||||
#define PROP(cookie, name, len) const auto cookie = xcb_get_property(DisplayConnection, false, window, name, XCB_GET_PROPERTY_TYPE_ANY, 0, len); \
|
||||
const auto cookie##reply = xcb_get_property_reply(DisplayConnection, cookie, NULL)
|
||||
|
|
|
@ -84,6 +84,9 @@ void AnimationUtil::move() {
|
|||
if (!VECTORDELTANONZERO(window.getRealPosition(), window.getEffectivePosition())
|
||||
&& !VECTORDELTANONZERO(window.getRealSize(), window.getEffectiveSize())) {
|
||||
window.setIsAnimated(false);
|
||||
|
||||
window.setRealSize(window.getEffectiveSize());
|
||||
window.setRealPosition(window.getEffectivePosition());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue