mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:47:46 +00:00
WindowServer: Support resizing windows.
This is pretty limited and not entirely stable, but it does work! :^)
This commit is contained in:
parent
a9911fca80
commit
59b8183c4b
11 changed files with 112 additions and 13 deletions
|
@ -21,6 +21,7 @@ public:
|
|||
WindowActivated,
|
||||
WindowDeactivated,
|
||||
WindowCloseRequest,
|
||||
WindowResized,
|
||||
|
||||
__Begin_API_Client_Requests,
|
||||
APICreateMenubarRequest,
|
||||
|
@ -451,3 +452,20 @@ private:
|
|||
unsigned m_buttons { 0 };
|
||||
MouseButton m_button { MouseButton::None };
|
||||
};
|
||||
|
||||
class WSResizeEvent final : public WSMessage {
|
||||
public:
|
||||
WSResizeEvent(const Rect& old_rect, const Rect& rect)
|
||||
: WSMessage(WSMessage::WindowResized)
|
||||
, m_old_rect(old_rect)
|
||||
, m_rect(rect)
|
||||
{
|
||||
}
|
||||
|
||||
Rect old_rect() const { return m_old_rect; }
|
||||
Rect rect() const { return m_rect; }
|
||||
|
||||
private:
|
||||
Rect m_old_rect;
|
||||
Rect m_rect;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue