summaryrefslogtreecommitdiff
path: root/plugingui/eventhandler.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2019-05-09 20:52:43 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2019-05-09 20:52:47 +0200
commit15faa626f7df7a3024dda5d11001347ed4573568 (patch)
treeaad5c44d8906caef72e76f767b6895c0a4682a46 /plugingui/eventhandler.cc
parent751f01eea8c40f70d412e691e6677d3daae54c7a (diff)
Add tooltip buttons to frames.
Diffstat (limited to 'plugingui/eventhandler.cc')
-rw-r--r--plugingui/eventhandler.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/plugingui/eventhandler.cc b/plugingui/eventhandler.cc
index 696b242..fd333b8 100644
--- a/plugingui/eventhandler.cc
+++ b/plugingui/eventhandler.cc
@@ -254,10 +254,31 @@ void EventHandler::processEvents()
closeNotifier();
break;
+
+ case EventType::mouseEnter:
+ {
+ auto enterEvent = static_cast<MouseEnterEvent*>(event.get());
+ auto widget = window.find(enterEvent->x, enterEvent->y);
+ if(widget)
+ {
+ widget->mouseEnterEvent();
+ }
+ }
+ break;
+
+ case EventType::mouseLeave:
+ {
+ auto widget = window.mouseFocus();
+ if(widget)
+ {
+ widget->mouseLeaveEvent();
+ }
+ }
+ break;
}
}
- // Probe window and children to readrw as needed.
+ // Probe window and children to redraw as needed.
// NOTE: This method will invoke native->redraw() if a redraw is needed.
window.updateBuffer();
}