mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Let the WindowManager track the active window.
We draw the active window in a different color, obviously. :^)
This commit is contained in:
parent
560405667e
commit
44a32039be
4 changed files with 63 additions and 12 deletions
|
@ -24,6 +24,9 @@ public:
|
|||
Widget* rootWidget() { return m_rootWidget; }
|
||||
void setRootWidget(Widget*);
|
||||
|
||||
Window* activeWindow() { return m_activeWindow.ptr(); }
|
||||
void setActiveWindow(Window*);
|
||||
|
||||
private:
|
||||
WindowManager();
|
||||
~WindowManager();
|
||||
|
@ -35,13 +38,18 @@ private:
|
|||
|
||||
virtual void event(Event&) override;
|
||||
|
||||
Color m_windowBorderColor;
|
||||
Color m_windowTitleColor;
|
||||
Color m_activeWindowBorderColor;
|
||||
Color m_activeWindowTitleColor;
|
||||
|
||||
Color m_inactiveWindowBorderColor;
|
||||
Color m_inactiveWindowTitleColor;
|
||||
|
||||
void paintWindowFrame(Window&);
|
||||
HashTable<Window*> m_windows;
|
||||
Widget* m_rootWidget { nullptr };
|
||||
|
||||
WeakPtr<Window> m_activeWindow;
|
||||
|
||||
WeakPtr<Window> m_dragWindow;
|
||||
|
||||
Point m_dragOrigin;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue