mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:37:42 +00:00
LibGUI: Don't consider a GWidget focused if the window is inactive.
This commit is contained in:
parent
25d045dee5
commit
2e370fa4d5
5 changed files with 24 additions and 5 deletions
|
@ -32,6 +32,7 @@ public:
|
|||
virtual void event(GEvent&) override;
|
||||
|
||||
bool is_visible() const;
|
||||
bool is_active() const { return m_is_active; }
|
||||
|
||||
void close();
|
||||
|
||||
|
@ -39,7 +40,6 @@ public:
|
|||
const GWidget* main_widget() const { return m_main_widget; }
|
||||
void set_main_widget(GWidget*);
|
||||
|
||||
|
||||
GWidget* focused_widget() { return m_focused_widget; }
|
||||
const GWidget* focused_widget() const { return m_focused_widget; }
|
||||
void set_focused_widget(GWidget*);
|
||||
|
@ -51,6 +51,7 @@ public:
|
|||
private:
|
||||
RetainPtr<GraphicsBitmap> m_backing;
|
||||
int m_window_id { -1 };
|
||||
bool m_is_active { false };
|
||||
GWidget* m_main_widget { nullptr };
|
||||
GWidget* m_focused_widget { nullptr };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue