summaryrefslogtreecommitdiffstats
path: root/src/client/shellintegration/qwaylandshellintegration_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/shellintegration/qwaylandshellintegration_p.h')
-rw-r--r--src/client/shellintegration/qwaylandshellintegration_p.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/client/shellintegration/qwaylandshellintegration_p.h b/src/client/shellintegration/qwaylandshellintegration_p.h
index e8e46ecaa..144e58352 100644
--- a/src/client/shellintegration/qwaylandshellintegration_p.h
+++ b/src/client/shellintegration/qwaylandshellintegration_p.h
@@ -53,6 +53,7 @@
#include <QtCore/qglobal.h>
#include <QtWaylandClient/qwaylandclientexport.h>
+#include <QtWaylandClient/private/qwaylanddisplay_p.h>
QT_BEGIN_NAMESPACE
@@ -68,8 +69,20 @@ public:
QWaylandShellIntegration() {}
virtual ~QWaylandShellIntegration() {}
- virtual bool initialize(QWaylandDisplay *display) = 0;
+ virtual bool initialize(QWaylandDisplay *display) {
+ m_display = display;
+ return true;
+ }
virtual QWaylandShellSurface *createShellSurface(QWaylandWindow *window) = 0;
+ virtual void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) {
+ if (newFocus)
+ m_display->handleWindowActivated(newFocus);
+ if (oldFocus)
+ m_display->handleWindowDeactivated(oldFocus);
+ }
+
+protected:
+ QWaylandDisplay *m_display;
};
}