diff options
Diffstat (limited to 'src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp')
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index be6fad15c..5c91c69e1 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -10,6 +10,7 @@ #include <QtWaylandClient/private/qwaylandwindow_p.h> #include <QtWaylandClient/private/qwaylandinputdevice_p.h> #include <QtWaylandClient/private/qwaylandscreen_p.h> +#include <QtWaylandClient/private/qwaylandcursor_p.h> #include <QtWaylandClient/private/qwaylandabstractdecoration_p.h> #include <QtGui/QGuiApplication> @@ -229,8 +230,10 @@ QWaylandXdgSurface::Popup::~Popup() leave = m_xdgSurface->window()->window(); QWindowSystemInterface::handleLeaveEvent(leave); - if (QWindow *enter = QGuiApplication::topLevelAt(QCursor::pos())) - QWindowSystemInterface::handleEnterEvent(enter, enter->mapFromGlobal(QCursor::pos()), QCursor::pos()); + if (QWindow *enter = QGuiApplication::topLevelAt(QCursor::pos())) { + const auto pos = m_xdgSurface->window()->display()->waylandCursor()->pos(); + QWindowSystemInterface::handleEnterEvent(enter, enter->handle()->mapFromGlobal(pos), pos); + } } } @@ -582,8 +585,10 @@ void QWaylandXdgSurface::setGrabPopup(QWaylandWindow *parent, QWaylandInputDevic if (m_popup && m_popup->m_xdgSurface && m_popup->m_xdgSurface->window()) enter = m_popup->m_xdgSurface->window()->window(); - if (enter) - QWindowSystemInterface::handleEnterEvent(enter, enter->mapFromGlobal(QCursor::pos()), QCursor::pos()); + if (enter) { + const auto pos = m_popup->m_xdgSurface->window()->display()->waylandCursor()->pos(); + QWindowSystemInterface::handleEnterEvent(enter, enter->handle()->mapFromGlobal(pos), pos); + } } void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial) |