diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-06-27 12:27:54 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-06-27 12:27:54 +0200 |
commit | 18a3f6169bb8a763366003d92b8013950578c79f (patch) | |
tree | e39fa00a9511410fea9be35a6130007e43719ad8 /src/plugins/platforms/wayland/qwaylanddisplay.cpp | |
parent | 371d398f70e10408e0eaba7b5f05e638a0048599 (diff) | |
parent | a06c8405d053b16327d65415f3335eceb37abd3b (diff) |
Merge remote-tracking branch 'base/master' into refactor
Conflicts:
demos/demos.pro
demos/embedded/digiflip/digiflip.pro
examples/examples.pro
examples/graphicsview/embeddeddialogs/embeddeddialogs.pro
src/gui/kernel/qplatformglcontext_qpa.cpp
src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglcontext.cpp
src/plugins/platforms/wayland/gl_integration/xcomposite_glx/qwaylandxcompositeglxcontext.cpp
src/plugins/platforms/wayland/qwaylanddisplay.cpp
src/plugins/platforms/wayland/qwaylandwindow.cpp
Change-Id: I2a4ec9e2ca9c9aa9d57b55f98985e810b77bb745
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylanddisplay.cpp')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylanddisplay.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index 9e8cfe3df6..f3e2e9fb94 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -125,9 +125,14 @@ const struct wl_shell_listener QWaylandDisplay::shellListener = { QWaylandDisplay::shellHandleConfigure, }; +static QWaylandDisplay *display = 0; + QWaylandDisplay::QWaylandDisplay(void) : argb_visual(0), premultiplied_argb_visual(0), rgb_visual(0) { + display = this; + qRegisterMetaType<uint32_t>("uint32_t"); + mDisplay = wl_display_connect(NULL); if (mDisplay == NULL) { qErrnoWarning(errno, "Failed to create display"); @@ -146,8 +151,6 @@ QWaylandDisplay::QWaylandDisplay(void) blockingReadEvents(); - qRegisterMetaType<uint32_t>("uint32_t"); - #ifdef QT_WAYLAND_GL_SUPPORT mEglIntegration->initialize(); #endif @@ -311,11 +314,7 @@ void QWaylandDisplay::displayHandleGlobal(uint32_t id, new QWaylandInputDevice(mDisplay, 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); + QWaylandClipboard::instance(display)->createSelectionOffer(id); } } |