mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00:00
WindowServer: Compute some layout rects in WSMenuManager up front
Currently menu applets are laid out relative to the "audio rect" which is the rect of the little audio muted state icon thingy. There was an issue where applets would be placed at a negative X coord if they were added to the WindowServer before the first time drawing the menubar.
This commit is contained in:
parent
20bbeba6d5
commit
6e6e0b9de8
3 changed files with 38 additions and 32 deletions
|
@ -23,6 +23,9 @@ public:
|
|||
|
||||
Vector<WeakPtr<WSMenu>>& open_menu_stack() { return m_open_menu_stack; }
|
||||
|
||||
Rect menubar_rect() const;
|
||||
static int menubar_menu_margin() { return 16; }
|
||||
|
||||
void set_needs_window_resize();
|
||||
|
||||
WSMenu* current_menu() { return m_current_menu.ptr(); }
|
||||
|
@ -64,6 +67,8 @@ private:
|
|||
OwnPtr<AClientConnection> m_audio_client;
|
||||
|
||||
Rect m_audio_rect;
|
||||
Rect m_username_rect;
|
||||
Rect m_time_rect;
|
||||
|
||||
bool m_needs_window_resize { false };
|
||||
bool m_bar_open { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue