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:
parent
18348cebf1
commit
7e7451c427
2 changed files with 32 additions and 10 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue