From 15faa626f7df7a3024dda5d11001347ed4573568 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 9 May 2019 20:52:43 +0200 Subject: Add tooltip buttons to frames. --- plugingui/nativewindow_x11.cc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'plugingui/nativewindow_x11.cc') 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(); + 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(); + leaveEvent->x = xevent.xcrossing.x; + leaveEvent->y = xevent.xcrossing.y; + event_queue.push_back(leaveEvent); + } + break; + case MapNotify: case MappingNotify: //DEBUG(x11, "EnterNotify"); -- cgit v1.2.3