From f8e65d24cf2b0dc83ff6ec47e33f1a4ffd4b56db Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Fri, 9 Sep 2022 07:21:31 -0400 Subject: LibGUI: Allow blocking CommandPalette/EmojiInput on a per Window basis Instead of having to negate every focusable widget or textbox, let windows override all their widgets. These two Dialogs now block themselves and each other. --- Userland/Libraries/LibGUI/Window.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Userland/Libraries/LibGUI/Window.h') diff --git a/Userland/Libraries/LibGUI/Window.h b/Userland/Libraries/LibGUI/Window.h index 9cefef3136..fddab1f195 100644 --- a/Userland/Libraries/LibGUI/Window.h +++ b/Userland/Libraries/LibGUI/Window.h @@ -225,6 +225,12 @@ public: Menubar& menubar() { return *m_menubar; } Menubar const& menubar() const { return *m_menubar; } + void set_blocks_command_palette(bool b) { m_blocks_command_palette = b; } + bool blocks_command_palette() const { return m_blocks_command_palette; } + + void set_blocks_emoji_input(bool b) { m_blocks_emoji_input = b; } + bool blocks_emoji_input() const { return m_blocks_emoji_input; } + protected: Window(Core::Object* parent = nullptr); virtual void wm_event(WMEvent&); @@ -307,6 +313,8 @@ private: bool m_visible_for_timer_purposes { true }; bool m_visible { false }; bool m_moved_by_client { false }; + bool m_blocks_command_palette { false }; + bool m_blocks_emoji_input { false }; }; } -- cgit v1.2.3