From 1bbaf60fd730b10420b44e00492a311acbc587e6 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 21 Apr 2017 12:42:53 -0300 Subject: [PATCH] Add Event::MouseEnter/Leave events on X11/Skia port --- src/she/x11/window.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/she/x11/window.cpp b/src/she/x11/window.cpp index 26f9115c2..5cc0f0611 100644 --- a/src/she/x11/window.cpp +++ b/src/she/x11/window.cpp @@ -223,6 +223,18 @@ void X11Window::processX11Event(XEvent& event) break; } + case EnterNotify: + case LeaveNotify: { + Event ev; + ev.setType(event.type == EnterNotify ? Event::MouseEnter: + Event::MouseLeave); + ev.setModifiers(get_modifiers_from_xevent(event.xcrossing.state)); + ev.setPosition(gfx::Point(event.xcrossing.x / m_scale, + event.xcrossing.y / m_scale)); + queueEvent(ev); + break; + } + } }