summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Window.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-10-23 17:53:11 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-23 17:53:11 +0200
commit24651f854c5e0bcc2ce13ed5b61f7c6e795f2160 (patch)
treef52f0f1a18933b1fc86292c8cbf37086d213568e /Userland/Libraries/LibGUI/Window.h
parentda86f4e38414499357bce41b389adfd28a6e8fa6 (diff)
downloadserenity-24651f854c5e0bcc2ce13ed5b61f7c6e795f2160.zip
LibGUI: Add Widget::repaint() to force an immediate repaint
In most situations, Widget::update() is preferable, since that allows us to coalesce repaints and avoid redundant work, reducing system load. However, there are some cases where you really want a paint to happen right away, to make sure that the user has a chance to see a short-lived visual state.
Diffstat (limited to 'Userland/Libraries/LibGUI/Window.h')
-rw-r--r--Userland/Libraries/LibGUI/Window.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/Window.h b/Userland/Libraries/LibGUI/Window.h
index e472873215..119a5529b7 100644
--- a/Userland/Libraries/LibGUI/Window.h
+++ b/Userland/Libraries/LibGUI/Window.h
@@ -202,6 +202,8 @@ public:
Menu& add_menu(String name);
+ void flush_pending_paints_immediately();
+
protected:
Window(Core::Object* parent = nullptr);
virtual void wm_event(WMEvent&);