summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylanddisplay.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-06-16 12:56:00 +0200
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-06-20 10:30:30 +0200
commitc84346ddff128daf6900860229aa99e4dc6763b2 (patch)
tree80055e58c282aa8b6a514ec967d21f46201aa024 /src/plugins/platforms/wayland/qwaylanddisplay.cpp
parent34d19a5571a422c53a7736d9c7a075da85aaa9c3 (diff)
Make glx wayland backends working.
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylanddisplay.cpp')
-rw-r--r--src/plugins/platforms/wayland/qwaylanddisplay.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp
index f1c9ccc18f..324f9dc632 100644
--- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp
@@ -47,9 +47,7 @@
#include "qwaylandinputdevice.h"
#include "qwaylandclipboard.h"
-#ifdef QT_WAYLAND_GL_SUPPORT
#include "gl_integration/qwaylandglintegration.h"
-#endif
#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
#include "windowmanager_integration/qwaylandwindowmanagerintegration.h"
@@ -93,12 +91,10 @@ struct wl_visual *QWaylandDisplay::argbPremultipliedVisual()
return premultiplied_argb_visual;
}
-#ifdef QT_WAYLAND_GL_SUPPORT
QWaylandGLIntegration * QWaylandDisplay::eglIntegration()
{
return mEglIntegration;
}
-#endif
#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration()
@@ -136,9 +132,7 @@ QWaylandDisplay::QWaylandDisplay(void)
wl_display_add_global_listener(mDisplay, QWaylandDisplay::displayHandleGlobal, this);
-#ifdef QT_WAYLAND_GL_SUPPORT
mEglIntegration = QWaylandGLIntegration::createGLIntegration(this);
-#endif
#ifdef QT_WAYLAND_WINDOWMANAGER_SUPPORT
mWindowManagerIntegration = QWaylandWindowManagerIntegration::createIntegration(this);
@@ -148,9 +142,7 @@ QWaylandDisplay::QWaylandDisplay(void)
qRegisterMetaType<uint32_t>("uint32_t");
-#ifdef QT_WAYLAND_GL_SUPPORT
mEglIntegration->initialize();
-#endif
connect(QAbstractEventDispatcher::instance(), SIGNAL(aboutToBlock()), this, SLOT(flushRequests()));
@@ -165,9 +157,7 @@ QWaylandDisplay::QWaylandDisplay(void)
QWaylandDisplay::~QWaylandDisplay(void)
{
close(mFd);
-#ifdef QT_WAYLAND_GL_SUPPORT
delete mEglIntegration;
-#endif
wl_display_destroy(mDisplay);
}
@@ -290,6 +280,8 @@ void QWaylandDisplay::displayHandleGlobal(uint32_t id,
mInputDevices.append(inputDevice);
} else if (interface == "wl_selection_offer") {
QPlatformIntegration *plat = QGuiApplicationPrivate::platformIntegration();
+ if (!plat)
+ return;
QWaylandClipboard *clipboard = static_cast<QWaylandClipboard *>(plat->clipboard());
clipboard->createSelectionOffer(id);
}