diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-27 08:48:34 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-27 08:48:34 +0100 |
commit | 069d21ed7f2cf6d5b5f277602b8a969284298b0f (patch) | |
tree | 7337af7a88ca2c469e70b4f74eed28ec54b7eb81 /LibGUI/GWidget.h | |
parent | 15fad649ea51d25e168e0456b5621beb820e254d (diff) | |
download | serenity-069d21ed7f2cf6d5b5f277602b8a969284298b0f.zip |
Make buttons unpress when the cursor leaves the button rect.
Implement this functionality by adding global cursor tracking.
It's currently only possible for one GWidget per GWindow to track the cursor.
Diffstat (limited to 'LibGUI/GWidget.h')
-rw-r--r-- | LibGUI/GWidget.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/LibGUI/GWidget.h b/LibGUI/GWidget.h index 15f3e1556c..afa10c370b 100644 --- a/LibGUI/GWidget.h +++ b/LibGUI/GWidget.h @@ -88,6 +88,9 @@ public: const Font& font() const { return *m_font; } void set_font(RetainPtr<Font>&&); + void set_global_cursor_tracking(bool); + bool global_cursor_tracking() const; + private: GWindow* m_window { nullptr }; |