1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

WindowServer: Don't de-maximize windows immediately (#756)

At least 5 pixels of dragging in some direction needed until a window
gets de-maximized.
This commit is contained in:
masi456 2019-11-10 18:28:01 +01:00 committed by Andreas Kling
parent 18348cebf1
commit 7e7451c427
2 changed files with 32 additions and 10 deletions

View file

@ -110,6 +110,16 @@ public:
set_y(value);
}
// Returns pixels moved from other in either direction
int pixels_moved(const Point &other) const
{
auto pixels_moved = max(
abs(other.x() - x()),
abs(other.y() - y())
);
return pixels_moved;
}
private:
int m_x { 0 };
int m_y { 0 };