summaryrefslogtreecommitdiff
path: root/plugingui/eventhandler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/eventhandler.cc')
-rw-r--r--plugingui/eventhandler.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugingui/eventhandler.cc b/plugingui/eventhandler.cc
index 1cf67fc..050c2e1 100644
--- a/plugingui/eventhandler.cc
+++ b/plugingui/eventhandler.cc
@@ -447,6 +447,15 @@ void GUI::EventHandler::processEvents(Window *window)
MouseMoveEvent *me = (MouseMoveEvent*)event;
Widget *w = window->find(me->x, me->y);
+ Widget *oldw = window->mouseFocus();
+ if(w != oldw) {
+ // Send focus leave to oldw
+ if(oldw) oldw->mouseLeaveEvent();
+ // Send focus enter to w
+ if(w) w->mouseEnterEvent();
+
+ window->setMouseFocus(w);
+ }
if(window->buttonDownFocus()) {
Widget *w = window->buttonDownFocus();