summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@digia.com>2013-06-19 14:11:50 +0200
committerJørgen Lind <jorgen.lind@digia.com>2013-06-26 13:47:51 +0200
commit00b13f99fe62e4a1716ffabb5abc065e9b20e2ad (patch)
treee607be677d554b7fd1adee97cbcac0eb6f60a43e
parentb8643f09f5a562af47b8b2fa9f65c9a74f11511c (diff)
downloadqtwayland-00b13f99fe62e4a1716ffabb5abc065e9b20e2ad.tar.gz
Fixup the windowmanager extension code
ie. don't have it in its own dir + fixup some errors in the string matching from when extensions where renamed from a wl_ prefix to a qt_ prefix Change-Id: I5707c24fa727b9e49bd267eeb23fc8e43c40354f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp2
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp4
-rw-r--r--src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp4
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro4
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp2
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp12
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.h1
-rw-r--r--src/plugins/platforms/wayland_common/qwaylanddisplay.cpp8
-rw-r--r--src/plugins/platforms/wayland_common/qwaylanddisplay.h7
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandintegration.cpp11
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandnativeinterface.cpp3
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandqtkey.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandtouch.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandwindow.cpp5
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandwindowmanagerintegration.cpp (renamed from src/plugins/platforms/wayland_common/windowmanager_integration/qwaylandwindowmanagerintegration.cpp)2
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandwindowmanagerintegration.h (renamed from src/plugins/platforms/wayland_common/windowmanager_integration/qwaylandwindowmanagerintegration.h)0
-rw-r--r--src/plugins/platforms/wayland_common/wayland_common.pro8
-rw-r--r--src/plugins/platforms/wayland_common/windowmanager_integration/windowmanager_integration.pri16
18 files changed, 18 insertions, 79 deletions
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp
index c5712d65..ebe5a4d6 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp
+++ b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp
@@ -62,7 +62,7 @@ QWaylandBrcmEglIntegration::QWaylandBrcmEglIntegration(QWaylandDisplay *waylandD
void QWaylandBrcmEglIntegration::wlDisplayHandleGlobal(void *data, struct wl_registry *registry, uint32_t id, const QString &interface, uint32_t version)
{
Q_UNUSED(version);
- if (interface == "wl_brcm") {
+ if (interface == "qt_brcm") {
QWaylandBrcmEglIntegration *integration = static_cast<QWaylandBrcmEglIntegration *>(data);
integration->m_waylandBrcm = static_cast<struct wl_brcm *>(wl_registry_bind(registry, id, &wl_brcm_interface, 1));
}
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp
index 0b2f4d31..78c0f465 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp
+++ b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp
@@ -50,10 +50,6 @@
#include <QtGui/QWindow>
#include <qpa/qwindowsysteminterface.h>
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
-#include "windowmanager_integration/qwaylandwindowmanagerintegration.h"
-#endif
-
#define EGL_EGLEXT_PROTOTYPES
#include <EGL/eglext_brcm.h>
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp b/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp
index 4e9a5d32..d4231346 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp
+++ b/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp
@@ -52,10 +52,6 @@
#include <QOpenGLFramebufferObject>
#include <QOpenGLContext>
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
-#include "windowmanager_integration/qwaylandwindowmanagerintegration.h"
-#endif
-
QT_USE_NAMESPACE
QWaylandEglWindow::QWaylandEglWindow(QWindow *window)
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro b/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro
index e41cf59b..b691ec9d 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro
@@ -6,10 +6,6 @@ include (../xcomposite_share/xcomposite_share.pri)
OTHER_FILES += qwayland-xcomposite-egl.json
-contains(DEFINES, QT_WAYLAND_WINDOWMANAGER_SUPPORT) {
- WAYLANDCLIENTSOURCES += ../../../extensions/windowmanager.xml
-}
-
!contains(QT_CONFIG, no-pkg-config) {
CONFIG += link_pkgconfig
PKGCONFIG += xcomposite egl x11
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp
index c2ea9a93..2d054f8e 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp
@@ -117,7 +117,7 @@ const struct qt_xcomposite_listener QWaylandXCompositeEGLIntegration::xcomposite
void QWaylandXCompositeEGLIntegration::wlDisplayHandleGlobal(void *data, wl_registry *registry, uint32_t id, const QString &interface, uint32_t version)
{
Q_UNUSED(version);
- if (interface == "wl_xcomposite") {
+ if (interface == "qt_xcomposite") {
QWaylandXCompositeEGLIntegration *integration = static_cast<QWaylandXCompositeEGLIntegration *>(data);
integration->mWaylandComposite = static_cast<struct qt_xcomposite *>(wl_registry_bind(registry,id,&qt_xcomposite_interface,1));
qt_xcomposite_add_listener(integration->mWaylandComposite,&xcomposite_listener,integration);
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp
index f1768991..3a040d14 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp
@@ -50,10 +50,6 @@
#include <X11/extensions/Xcomposite.h>
#include "qwaylandxcompositeeglintegration.h"
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
-#include "windowmanager_integration/qwaylandwindowmanagerintegration.h"
-#endif
-
#include <QtCore/QDebug>
QT_USE_NAMESPACE
@@ -138,11 +134,3 @@ void QWaylandXCompositeEGLWindow::createEglSurface()
attach(m_buffer, 0, 0);
}
-void QWaylandXCompositeEGLWindow::requestActivateWindow()
-{
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
- mDisplay->windowManagerIntegration()->authenticateWithToken();
-#endif
-
- QWaylandWindow::requestActivateWindow();
-}
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.h b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.h
index 98f0ed73..8fb63118 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.h
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.h
@@ -57,7 +57,6 @@ public:
WindowType windowType() const;
void setGeometry(const QRect &rect);
- void requestActivateWindow();
EGLSurface eglSurface() const;
diff --git a/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp b/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp
index c919f45b..c06fd336 100644
--- a/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp
@@ -53,9 +53,7 @@
#include "qwaylandglintegration.h"
#endif
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
-#include "windowmanager_integration/qwaylandwindowmanagerintegration.h"
-#endif
+#include "qwaylandwindowmanagerintegration.h"
#include "qwaylandextendedoutput.h"
#include "qwaylandextendedsurface.h"
@@ -84,12 +82,10 @@ QWaylandGLIntegration * QWaylandDisplay::eglIntegration()
}
#endif
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration()
{
return mWindowManagerIntegration;
}
-#endif
QWaylandInputDevice *QWaylandDisplay::lastKeyboardFocusInputDevice() const
{
@@ -139,9 +135,7 @@ QWaylandDisplay::QWaylandDisplay()
mEglIntegration = QWaylandGLIntegration::createGLIntegration(this);
#endif
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
mWindowManagerIntegration = new QWaylandWindowManagerIntegration(this);
-#endif
blockingReadEvents();
diff --git a/src/plugins/platforms/wayland_common/qwaylanddisplay.h b/src/plugins/platforms/wayland_common/qwaylanddisplay.h
index bb26be69..111271ff 100644
--- a/src/plugins/platforms/wayland_common/qwaylanddisplay.h
+++ b/src/plugins/platforms/wayland_common/qwaylanddisplay.h
@@ -96,9 +96,7 @@ public:
QWaylandGLIntegration *eglIntegration();
#endif
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
QWaylandWindowManagerIntegration *windowManagerIntegration();
-#endif
void setCursor(struct wl_buffer *buffer, struct wl_cursor_image *image);
@@ -162,6 +160,7 @@ private:
QtWayland::qt_output_extension *mOutputExtension;
QWaylandTouchExtension *mTouchExtension;
QWaylandQtKeyExtension *mQtKeyExtension;
+ QWaylandWindowManagerIntegration *mWindowManagerIntegration;
QSocketNotifier *mReadNotifier;
int mFd;
@@ -174,10 +173,6 @@ private:
QWaylandGLIntegration *mEglIntegration;
#endif
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
- QWaylandWindowManagerIntegration *mWindowManagerIntegration;
-#endif
-
static void shellHandleConfigure(void *data, struct wl_shell *shell,
uint32_t time, uint32_t edges,
struct wl_surface *surface,
diff --git a/src/plugins/platforms/wayland_common/qwaylandintegration.cpp b/src/plugins/platforms/wayland_common/qwaylandintegration.cpp
index c3a479a2..f541d49b 100644
--- a/src/plugins/platforms/wayland_common/qwaylandintegration.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandintegration.cpp
@@ -47,6 +47,7 @@
#include "qwaylandnativeinterface.h"
#include "qwaylandclipboard.h"
#include "qwaylanddnd.h"
+#include "qwaylandwindowmanagerintegration.h"
#include "QtPlatformSupport/private/qgenericunixfontdatabase_p.h"
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
@@ -67,9 +68,6 @@
#include "qwaylandglintegration.h"
#endif
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
-#include "windowmanager_integration/qwaylandwindowmanagerintegration.h"
-#endif
QT_USE_NAMESPACE
@@ -184,10 +182,9 @@ QPlatformInputContext *QWaylandIntegration::inputContext() const
QVariant QWaylandIntegration::styleHint(StyleHint hint) const
{
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
if (hint == ShowIsFullScreen && mDisplay->windowManagerIntegration())
return mDisplay->windowManagerIntegration()->showIsFullScreen();
-#endif
+
return QPlatformIntegration::styleHint(hint);
}
@@ -198,11 +195,7 @@ QPlatformAccessibility *QWaylandIntegration::accessibility() const
QPlatformServices *QWaylandIntegration::services() const
{
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
return mDisplay->windowManagerIntegration();
-#else
- return QWaylandIntegration::services();
-#endif
}
QWaylandDisplay *QWaylandIntegration::display() const
diff --git a/src/plugins/platforms/wayland_common/qwaylandnativeinterface.cpp b/src/plugins/platforms/wayland_common/qwaylandnativeinterface.cpp
index abf9f105..56afaa24 100644
--- a/src/plugins/platforms/wayland_common/qwaylandnativeinterface.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandnativeinterface.cpp
@@ -45,11 +45,10 @@
#include "qwaylandextendedsurface.h"
#include "qwaylandintegration.h"
#include "qwaylanddisplay.h"
+#include "qwaylandwindowmanagerintegration.h"
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/QScreen>
-#include "windowmanager_integration/qwaylandwindowmanagerintegration.h"
-
QT_USE_NAMESPACE
QWaylandNativeInterface::QWaylandNativeInterface(QWaylandIntegration *integration)
diff --git a/src/plugins/platforms/wayland_common/qwaylandqtkey.cpp b/src/plugins/platforms/wayland_common/qwaylandqtkey.cpp
index d9f2071e..774d24b6 100644
--- a/src/plugins/platforms/wayland_common/qwaylandqtkey.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandqtkey.cpp
@@ -63,7 +63,7 @@ void QWaylandQtKeyExtension::key_extension_qtkey(uint32_t time,
{
QList<QWaylandInputDevice *> inputDevices = m_display->inputDevices();
if (inputDevices.isEmpty()) {
- qWarning("wl_qtkey_extension: handle_qtkey: No input device");
+ qWarning("qt_key_extension: handle_qtkey: No input device");
return;
}
@@ -71,7 +71,7 @@ void QWaylandQtKeyExtension::key_extension_qtkey(uint32_t time,
QWaylandWindow *win = dev->mKeyboardFocus;
if (!win || !win->window()) {
- qWarning("wl_qtkey_extension: handle_qtkey: No keyboard focus");
+ qWarning("qt_key_extension: handle_qtkey: No keyboard focus");
return;
}
diff --git a/src/plugins/platforms/wayland_common/qwaylandtouch.cpp b/src/plugins/platforms/wayland_common/qwaylandtouch.cpp
index b19165d6..d241120e 100644
--- a/src/plugins/platforms/wayland_common/qwaylandtouch.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandtouch.cpp
@@ -78,7 +78,7 @@ void QWaylandTouchExtension::touch_extension_touch(uint32_t time,
if (!mInputDevice) {
QList<QWaylandInputDevice *> inputDevices = mDisplay->inputDevices();
if (inputDevices.isEmpty()) {
- qWarning("wl_touch_extension: handle_touch: No input devices");
+ qWarning("qt_touch_extension: handle_touch: No input devices");
return;
}
mInputDevice = inputDevices.first();
@@ -89,7 +89,7 @@ void QWaylandTouchExtension::touch_extension_touch(uint32_t time,
if (!win)
win = mInputDevice->mKeyboardFocus;
if (!win || !win->window()) {
- qWarning("wl_touch_extension: handle_touch: No pointer focus");
+ qWarning("qt_touch_extension: handle_touch: No pointer focus");
return;
}
mTargetWindow = win->window();
diff --git a/src/plugins/platforms/wayland_common/qwaylandwindow.cpp b/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
index 2b2ae541..3fd184ca 100644
--- a/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
@@ -49,14 +49,11 @@
#include "qwaylandextendedsurface.h"
#include "qwaylandsubsurface.h"
#include "qwaylanddecoration.h"
+#include "qwaylandwindowmanagerintegration.h"
#include <QtCore/QFileInfo>
#include <QtGui/QWindow>
-#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
-#include "windowmanager_integration/qwaylandwindowmanagerintegration.h"
-#endif
-
#include <QCoreApplication>
#include <qpa/qwindowsysteminterface.h>
diff --git a/src/plugins/platforms/wayland_common/windowmanager_integration/qwaylandwindowmanagerintegration.cpp b/src/plugins/platforms/wayland_common/qwaylandwindowmanagerintegration.cpp
index 673400bd..dde867b2 100644
--- a/src/plugins/platforms/wayland_common/windowmanager_integration/qwaylandwindowmanagerintegration.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandwindowmanagerintegration.cpp
@@ -93,7 +93,7 @@ bool QWaylandWindowManagerIntegration::showIsFullScreen() const
void QWaylandWindowManagerIntegration::wlHandleListenerGlobal(void *data, wl_registry *registry, uint32_t id, const QString &interface, uint32_t version)
{
Q_UNUSED(version);
- if (interface == "wl_windowmanager")
+ if (interface == "qt_windowmanager")
static_cast<QWaylandWindowManagerIntegration *>(data)->init(registry, id);
}
diff --git a/src/plugins/platforms/wayland_common/windowmanager_integration/qwaylandwindowmanagerintegration.h b/src/plugins/platforms/wayland_common/qwaylandwindowmanagerintegration.h
index 0982632d..0982632d 100644
--- a/src/plugins/platforms/wayland_common/windowmanager_integration/qwaylandwindowmanagerintegration.h
+++ b/src/plugins/platforms/wayland_common/qwaylandwindowmanagerintegration.h
diff --git a/src/plugins/platforms/wayland_common/wayland_common.pro b/src/plugins/platforms/wayland_common/wayland_common.pro
index 4a1b0e88..d8aedb65 100644
--- a/src/plugins/platforms/wayland_common/wayland_common.pro
+++ b/src/plugins/platforms/wayland_common/wayland_common.pro
@@ -2,7 +2,6 @@ TEMPLATE = lib
CONFIG += staticlib
include ($$PWD/wayland_common_share.pri)
-include (windowmanager_integration/windowmanager_integration.pri)
SOURCES += qwaylandintegration.cpp \
qwaylandnativeinterface.cpp \
@@ -26,7 +25,8 @@ SOURCES += qwaylandintegration.cpp \
qwaylandqtkey.cpp \
../../../shared/qwaylandmimehelper.cpp \
qwaylanddecoration.cpp \
- qwaylandeventthread.cpp
+ qwaylandeventthread.cpp\
+ qwaylandwindowmanagerintegration.cpp
HEADERS += qwaylandintegration.h \
qwaylandnativeinterface.h \
@@ -51,7 +51,8 @@ HEADERS += qwaylandintegration.h \
qwaylandqtkey.h \
../../../shared/qwaylandmimehelper.h \
qwaylanddecoration.h \
- qwaylandeventthread.h
+ qwaylandeventthread.h \
+ qwaylandwindowmanagerintegration.h
contains(DEFINES, QT_WAYLAND_GL_SUPPORT) {
SOURCES += qwaylandglintegration.cpp
@@ -64,6 +65,7 @@ WAYLANDCLIENTSOURCES += \
../../../extensions/output-extension.xml \
../../../extensions/touch-extension.xml \
../../../extensions/qtkey-extension.xml \
+ ../../../extensions/windowmanager.xml \
PLUGIN_TYPE = platforms
diff --git a/src/plugins/platforms/wayland_common/windowmanager_integration/windowmanager_integration.pri b/src/plugins/platforms/wayland_common/windowmanager_integration/windowmanager_integration.pri
deleted file mode 100644
index 9228358e..00000000
--- a/src/plugins/platforms/wayland_common/windowmanager_integration/windowmanager_integration.pri
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINES += QT_WAYLAND_WINDOWMANAGER_SUPPORT
-
-contains(DEFINES, QT_WAYLAND_WINDOWMANAGER_SUPPORT) {
-
- WAYLANDCLIENTSOURCES += $$PWD/../../../../extensions/windowmanager.xml
-
- HEADERS += \
- $$PWD/qwaylandwindowmanagerintegration.h
-
- SOURCES += \
- $$PWD/qwaylandwindowmanagerintegration.cpp
-
-}
-
-
-