1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:17:35 +00:00

LibGUI+WindowServer+Applets+Taskbar: Remove active input concepts

and the CaptureInput mode. They are a source of unneeded complexity
in WindowServer and have proven prone to regressions, so this patch
replaces them with a simple input preemption scheme using Popups.

Popup windows now have ergonomics similar to menus: When open,
a popup preempts all mouse and key events for the entire window
stack; however, they are fragile and will close after WindowServer
swallows the first event outside them. This is similar to how combo
box windows and popups work in the classic Windows DE and has the
added benefit of letting the user click anywhere to dismiss a popup
without having to worry about unwanted interactions with other
widgets.
This commit is contained in:
thankyouverycool 2022-11-17 10:00:07 -05:00 committed by Andreas Kling
parent 35bd79701c
commit 24d299c9c8
17 changed files with 76 additions and 191 deletions

View file

@ -106,7 +106,7 @@ public:
bool is_closeable() const { return m_closeable; }
void set_closeable(bool);
bool is_resizable() const { return m_resizable && !m_fullscreen; }
bool is_resizable() const { return m_type != WindowType::Popup && m_resizable && !m_fullscreen; }
void set_resizable(bool);
bool is_maximized() const { return m_tile_type == WindowTileType::Maximized; }
@ -182,9 +182,6 @@ public:
bool is_passive() { return m_mode == WindowMode::Passive; }
bool is_rendering_above() { return m_mode == WindowMode::RenderAbove; }
bool is_capturing_input() const { return m_mode == WindowMode::CaptureInput; }
bool is_capturing_active_input_from(Window const&) const;
bool is_blocking() const { return m_mode == WindowMode::Blocking; }
Window* blocking_modal_window();