1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10: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

@ -100,16 +100,6 @@ public:
Window* foremost_popup_window(WindowStack& stack = WindowManager::the().current_window_stack());
void request_close_fragile_windows(WindowStack& stack = WindowManager::the().current_window_stack());
Window* active_input_window()
{
VERIFY(m_current_window_stack);
return m_current_window_stack->active_input_window();
}
Window const* active_input_window() const
{
VERIFY(m_current_window_stack);
return m_current_window_stack->active_input_window();
}
ConnectionFromClient const* active_client() const;
@ -164,9 +154,7 @@ public:
void set_buttons_switched(bool);
bool get_buttons_switched() const;
Window* set_active_input_window(Window*);
void restore_active_input_window(Window*);
void set_active_window(Window*, bool make_input = true);
void set_active_window(Window*);
void set_hovered_button(Button*);
Button const* cursor_tracking_button() const { return m_cursor_tracking_button.ptr(); }
@ -188,8 +176,6 @@ public:
void tell_wms_super_digit_key_pressed(u8);
void tell_wms_current_window_stack_changed();
bool is_active_window_or_capturing_modal(Window&) const;
void check_hide_geometry_overlay(Window&);
void start_window_resize(Window&, Gfx::IntPoint const&, MouseButton, ResizeDirection);