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

LibGUI: Add GUI::Application::active_window()

Instead of each window having a bool flag that says whether that window
is currently active, have a pointer to the active window on the app
object instead.
This commit is contained in:
Andreas Kling 2021-01-05 15:43:59 +01:00
parent 8b90e8d08b
commit 1c8eaf28cd
4 changed files with 31 additions and 3 deletions

View file

@ -113,7 +113,7 @@ public:
virtual void event(Core::Event&) override;
bool is_visible() const;
bool is_active() const { return m_is_active; }
bool is_active() const;
bool is_active_input() const { return m_is_active_input; }
bool is_accessory() const { return m_accessory; }
@ -247,7 +247,6 @@ private:
WindowType m_window_type { WindowType::Normal };
Gfx::StandardCursor m_cursor { Gfx::StandardCursor::None };
Gfx::StandardCursor m_effective_cursor { Gfx::StandardCursor::None };
bool m_is_active { false };
bool m_is_active_input { false };
bool m_has_alpha_channel { false };
bool m_double_buffering_enabled { true };