diff options
Diffstat (limited to 'src/client/qwaylandxdgshellv6integration.cpp')
-rw-r--r-- | src/client/qwaylandxdgshellv6integration.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/client/qwaylandxdgshellv6integration.cpp b/src/client/qwaylandxdgshellv6integration.cpp index cb82354b6..d3327ff39 100644 --- a/src/client/qwaylandxdgshellv6integration.cpp +++ b/src/client/qwaylandxdgshellv6integration.cpp @@ -78,6 +78,20 @@ QWaylandShellSurface *QWaylandXdgShellV6Integration::createShellSurface(QWayland return m_xdgShell->getXdgSurface(window); } +void QWaylandXdgShellV6Integration::handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) +{ + if (newFocus) { + auto *xdgSurface = qobject_cast<QWaylandXdgSurfaceV6 *>(newFocus->shellSurface()); + if (xdgSurface && xdgSurface->handlesActiveState()) + m_display->handleWindowActivated(newFocus); + } + if (oldFocus && qobject_cast<QWaylandXdgPopup *>(oldFocus->shellSurface())) { + auto *xdgSurface = qobject_cast<QWaylandXdgSurfaceV6 *>(oldFocus->shellSurface()); + if (xdgSurface && xdgSurface->handlesActiveState()) + m_display->handleWindowDeactivated(oldFocus); + } +} + } QT_END_NAMESPACE |