mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
WindowServer+LibGUI: Mark window bitmaps volatile in occluded windows
WindowServer now tracks whether windows are occluded (meaning that they are completely covered by one or more opaque windows sitting above them.) This state is communicated to the windows via WindowStateChanged messages, which then allow GWindow to mark its backing store volatile. This reduces the effective memory impact of windows that are not at all visible to the user. Very cool. :^)
This commit is contained in:
parent
5d1acdda82
commit
c7847d7c81
9 changed files with 72 additions and 10 deletions
|
@ -101,7 +101,8 @@ public:
|
|||
const GWidget* focused_widget() const { return m_focused_widget; }
|
||||
void set_focused_widget(GWidget*);
|
||||
|
||||
void update(const Rect& = Rect());
|
||||
void update();
|
||||
void update(const Rect&);
|
||||
|
||||
void set_global_cursor_tracking_widget(GWidget*);
|
||||
GWidget* global_cursor_tracking_widget() { return m_global_cursor_tracking_widget.ptr(); }
|
||||
|
@ -136,7 +137,7 @@ public:
|
|||
void schedule_relayout();
|
||||
|
||||
static void update_all_windows(Badge<GWindowServerConnection>);
|
||||
void notify_state_changed(Badge<GWindowServerConnection>, bool minimized);
|
||||
void notify_state_changed(Badge<GWindowServerConnection>, bool minimized, bool occluded);
|
||||
|
||||
protected:
|
||||
GWindow(CObject* parent = nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue