1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 15:47:35 +00:00

LibGUI+WindowServer: Remove ResizeEvent::old_size()

Turns out nobody was using this information anyway, so let's not go
through all the trouble of plumbing it from WindowServer to LibGUI.

Fixes #3247.
This commit is contained in:
Andreas Kling 2020-08-22 13:10:35 +02:00
parent 683ae4f7ad
commit e374eb3035
7 changed files with 18 additions and 33 deletions

View file

@ -56,12 +56,12 @@ public:
WindowResized,
};
Event() {}
Event() { }
explicit Event(Type type)
: Core::Event(type)
{
}
virtual ~Event() {}
virtual ~Event() { }
bool is_mouse_event() const { return type() == MouseMove || type() == MouseDown || type() == MouseDoubleClick || type() == MouseUp || type() == MouseWheel; }
bool is_key_event() const { return type() == KeyUp || type() == KeyDown; }
@ -144,18 +144,15 @@ private:
class ResizeEvent final : public Event {
public:
ResizeEvent(const Gfx::IntRect& old_rect, const Gfx::IntRect& rect)
ResizeEvent(const Gfx::IntRect& rect)
: Event(Event::WindowResized)
, m_old_rect(old_rect)
, m_rect(rect)
{
}
Gfx::IntRect old_rect() const { return m_old_rect; }
Gfx::IntRect rect() const { return m_rect; }
private:
Gfx::IntRect m_old_rect;
Gfx::IntRect m_rect;
};