mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:57:45 +00:00
LibGUI: Put a governor on Action activation
Many actions affect Window modality, so let's put a temporary change governor on activation to stop race conditions. Fixes being able to spam open/close shortcuts and spawn multiple FilePickers, among other things.
This commit is contained in:
parent
7323a54e59
commit
c87c4f6d94
2 changed files with 9 additions and 1 deletions
|
@ -121,6 +121,8 @@ public:
|
|||
}
|
||||
void set_checked(bool);
|
||||
|
||||
bool is_activating() const { return m_activating; }
|
||||
|
||||
bool swallow_key_event_when_disabled() const { return m_swallow_key_event_when_disabled; }
|
||||
void set_swallow_key_event_when_disabled(bool swallow) { m_swallow_key_event_when_disabled = swallow; }
|
||||
|
||||
|
@ -157,6 +159,7 @@ private:
|
|||
bool m_checkable { false };
|
||||
bool m_checked { false };
|
||||
bool m_swallow_key_event_when_disabled { false };
|
||||
bool m_activating { false };
|
||||
ShortcutScope m_scope { ShortcutScope::None };
|
||||
|
||||
HashTable<Button*> m_buttons;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue