mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +00:00
WindowServer: Add accessory windows
Accessory windows are windows that, when activated, will activate their parent and bring all other accessory windows of that parent to the front of the window stack. Accessory windows can only be active input windows. The accessory window's parent is always the active window regardless of whether it is also the active input window. In order to route input correctly, input is now sent to the active input window, which can be any accessory window or their parent, or any regular window.
This commit is contained in:
parent
396291b356
commit
ec3737510d
16 changed files with 216 additions and 59 deletions
|
@ -145,7 +145,7 @@ public:
|
|||
bool set_resolution(int width, int height);
|
||||
Gfx::IntSize resolution() const;
|
||||
|
||||
void set_active_window(Window*);
|
||||
void set_active_window(Window*, bool make_input = true);
|
||||
void set_hovered_button(Button*);
|
||||
|
||||
const Button* cursor_tracking_button() const { return m_cursor_tracking_button.ptr(); }
|
||||
|
@ -159,6 +159,8 @@ public:
|
|||
void tell_wm_listeners_window_icon_changed(Window&);
|
||||
void tell_wm_listeners_window_rect_changed(Window&);
|
||||
|
||||
bool is_active_window_or_accessory(Window&) const;
|
||||
|
||||
void start_window_resize(Window&, const Gfx::IntPoint&, MouseButton);
|
||||
void start_window_resize(Window&, const MouseEvent&);
|
||||
|
||||
|
@ -205,7 +207,9 @@ private:
|
|||
void tell_wm_listener_about_window(Window& listener, Window&);
|
||||
void tell_wm_listener_about_window_icon(Window& listener, Window&);
|
||||
void tell_wm_listener_about_window_rect(Window& listener, Window&);
|
||||
void pick_new_active_window();
|
||||
void pick_new_active_window(Window&);
|
||||
|
||||
void do_move_to_front(Window&, bool, bool);
|
||||
|
||||
RefPtr<Cursor> m_arrow_cursor;
|
||||
RefPtr<Cursor> m_hand_cursor;
|
||||
|
@ -262,6 +266,7 @@ private:
|
|||
WeakPtr<Window> m_hovered_window;
|
||||
WeakPtr<Window> m_highlight_window;
|
||||
WeakPtr<Window> m_active_input_window;
|
||||
WeakPtr<Window> m_active_input_tracking_window;
|
||||
|
||||
WeakPtr<Window> m_move_window;
|
||||
Gfx::IntPoint m_move_origin;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue