summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/gl_integration
diff options
context:
space:
mode:
authorMartin Zielinski <martin.zielinski@nokia.com>2011-07-04 09:41:26 +0200
committerQt by Nokia <qt-info@nokia.com>2011-07-08 11:22:30 +0200
commitfc9e419cabc67c33907661dfbfa5595a5896afdb (patch)
treea6c661f73df7c53f22023389f5d32f8529e6dfd6 /src/plugins/platforms/wayland/gl_integration
parentb2aa1c7939ec3d7f0598e220c44947fe9fd81e3d (diff)
Fixed wayland windowmanager-protocol authorization
The authorization is now handled more robust. The client tries to authenticate as soon as a surface is created, but does so only if the authentication token is valid. A re-authorization than happens when requestActivateWindow() is called. This is needed to get the auth-process properly working even with pre-started clients, that do not have a valid token on surface-creation time. Change-Id: I4371b424686b9d5a6a163a802ec66a33c0aeeea7 Reviewed-on: http://codereview.qt.nokia.com/1207 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lasse Holmstedt
Diffstat (limited to 'src/plugins/platforms/wayland/gl_integration')
-rw-r--r--src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.cpp11
-rw-r--r--src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.cpp b/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.cpp
index 3daf5f619..1047cb8b0 100644
--- a/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.cpp
+++ b/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.cpp
@@ -40,6 +40,8 @@
****************************************************************************/
#include "qwaylandxcompositeeglwindow.h"
+#include "qwaylandxcompositeeglintegration.h"
+#include "windowmanager_integration/qwaylandwindowmanagerintegration.h"
#include <QtCore/QDebug>
@@ -75,3 +77,12 @@ void QWaylandXCompositeEGLWindow::setGeometry(const QRect &rect)
mContext->geometryChanged();
}
}
+
+void QWaylandXCompositeEGLWindow::requestActivateWindow()
+{
+#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
+ mDisplay->windowManagerIntegration()->authenticateWithToken();
+#endif
+
+ QWaylandWindow::requestActivateWindow();
+}
diff --git a/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.h b/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.h
index 707801905..ea4dd2d62 100644
--- a/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.h
+++ b/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.h
@@ -55,6 +55,7 @@ public:
QPlatformGLContext *glContext() const;
void setGeometry(const QRect &rect);
+ void requestActivateWindow();
private:
QWaylandXCompositeEGLIntegration *mGlxIntegration;