1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00

WindowServer: Factor out some parts of compose().

The main compositing loop was getting pretty unwieldy. Break out some parts
into functions so it's more understandable.
This commit is contained in:
Andreas Kling 2019-04-10 13:51:47 +02:00
parent f6543c5946
commit 30e2d62c38
4 changed files with 85 additions and 71 deletions

View file

@ -59,6 +59,7 @@ public:
void draw_cursor();
void draw_menubar();
void draw_window_switcher();
void draw_geometry_label();
Rect menubar_rect() const;
WSMenuBar* current_menubar() { return m_current_menubar.ptr(); }
@ -107,6 +108,9 @@ public:
void set_resize_candidate(WSWindow&, ResizeDirection);
void clear_resize_candidate();
bool any_opaque_window_contains_rect(const Rect&);
bool any_opaque_window_above_this_one_contains_rect(const WSWindow&, const Rect&);
private:
void process_mouse_event(const WSMouseEvent&, WSWindow*& event_window);
bool process_ongoing_window_resize(const WSMouseEvent&, WSWindow*& event_window);