diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2019-05-09 20:52:43 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2019-05-09 20:52:47 +0200 |
commit | 15faa626f7df7a3024dda5d11001347ed4573568 (patch) | |
tree | aad5c44d8906caef72e76f767b6895c0a4682a46 /plugingui/nativewindow_x11.cc | |
parent | 751f01eea8c40f70d412e691e6677d3daae54c7a (diff) |
Add tooltip buttons to frames.
Diffstat (limited to 'plugingui/nativewindow_x11.cc')
-rw-r--r-- | plugingui/nativewindow_x11.cc | 22 |
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"); |