summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Window.h
diff options
context:
space:
mode:
authorsin-ack <sin-ack@users.noreply.github.com>2021-07-25 21:07:55 +0000
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-07-26 21:14:39 +0430
commit444ed565215f5b164978cab7a7cb1ee86959cc34 (patch)
treea07d92ba2d3df91470675f6c9925553e86e79f9b /Userland/Libraries/LibGUI/Window.h
parent6162e78c7f5f04078433362bb39cb774d15ff97f (diff)
downloadserenity-444ed565215f5b164978cab7a7cb1ee86959cc34.zip
LibGUI: Add virtual handlers for WindowEntered and WindowLeft events
These can be useful if an application wants to react to the cursor entering the window at any point, rather than just on a widget.
Diffstat (limited to 'Userland/Libraries/LibGUI/Window.h')
-rw-r--r--Userland/Libraries/LibGUI/Window.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/Window.h b/Userland/Libraries/LibGUI/Window.h
index 9f2b433b41..0b597f90ed 100644
--- a/Userland/Libraries/LibGUI/Window.h
+++ b/Userland/Libraries/LibGUI/Window.h
@@ -208,6 +208,9 @@ protected:
virtual void wm_event(WMEvent&);
virtual void screen_rects_change_event(ScreenRectsChangeEvent&);
+ virtual void enter_event(Core::Event&);
+ virtual void leave_event(Core::Event&);
+
private:
void update_cursor();
void focus_a_widget_if_possible(FocusSource);
@@ -224,7 +227,8 @@ private:
void handle_fonts_change_event(FontsChangeEvent&);
void handle_screen_rects_change_event(ScreenRectsChangeEvent&);
void handle_drag_move_event(DragEvent&);
- void handle_left_event();
+ void handle_entered_event(Core::Event&);
+ void handle_left_event(Core::Event&);
void server_did_destroy();