summaryrefslogtreecommitdiff
path: root/plugingui/nativewindow_x11.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/nativewindow_x11.cc
parent751f01eea8c40f70d412e691e6677d3daae54c7a (diff)
Add tooltip buttons to frames.
Diffstat (limited to 'plugingui/nativewindow_x11.cc')
-rw-r--r--plugingui/nativewindow_x11.cc22
1 files changed, 21 insertions, 1 deletions
diff --git a/plugingui/nativewindow_x11.cc b/plugingui/nativewindow_x11.cc
index f77a772..e96f26a 100644
--- a/plugingui/nativewindow_x11.cc
+++ b/plugingui/nativewindow_x11.cc
@@ -92,7 +92,9 @@ NativeWindowX11::NativeWindowX11(void* native_window, Window& window)
KeyReleaseMask|
ExposureMask |
StructureNotifyMask |
- SubstructureNotifyMask);
+ SubstructureNotifyMask |
+ EnterWindowMask |
+ LeaveWindowMask);
XSelectInput(display, xwindow, mask);
// Register the delete window message:
@@ -467,7 +469,25 @@ void NativeWindowX11::translateXMessage(XEvent& xevent)
break;
case EnterNotify:
+ //DEBUG(x11, "EnterNotify");
+ {
+ auto enterEvent = std::make_shared<MouseEnterEvent>();
+ enterEvent->x = xevent.xcrossing.x;
+ enterEvent->y = xevent.xcrossing.y;
+ event_queue.push_back(enterEvent);
+ }
+ break;
+
case LeaveNotify:
+ //DEBUG(x11, "LeaveNotify");
+ {
+ auto leaveEvent = std::make_shared<MouseLeaveEvent>();
+ leaveEvent->x = xevent.xcrossing.x;
+ leaveEvent->y = xevent.xcrossing.y;
+ event_queue.push_back(leaveEvent);
+ }
+ break;
+
case MapNotify:
case MappingNotify:
//DEBUG(x11, "EnterNotify");