diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2014-12-19 17:12:41 +0100 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2014-12-22 21:38:35 +0100 |
commit | f9f54bc0e46e6abc88316e653347036994e2eba9 (patch) | |
tree | 23ed408039feb2b4df1b4b9e6220e37b7274fddd /src/plugins/platforms/xcb/qxcbnativeinterface.cpp | |
parent | bf86735f073aaf61278230708b92c5193c5f9e15 (diff) |
Add some missing nativeResourceForIntegration imlementations
The EglDisplay and the Display is normally a PlatformIntegration wide
resource
Change-Id: Ie5382a2a0b34fbe1c506b5134bf581afbd7f5d99
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index d5b8e6aead..956b0f83d2 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -228,6 +228,9 @@ void *QXcbNativeInterface::nativeResourceForIntegration(const QByteArray &resour case RootWindow: result = rootWindow(); break; + case Display: + result = display(); + break; default: break; } @@ -421,6 +424,17 @@ void *QXcbNativeInterface::rootWindow() return 0; } +void *QXcbNativeInterface::display() +{ +#ifdef XCB_USE_XLIB + QXcbIntegration *integration = static_cast<QXcbIntegration *>(QGuiApplicationPrivate::platformIntegration()); + QXcbConnection *defaultConnection = integration->defaultConnection(); + return defaultConnection->xlib_display(); +#else + return 0; +#endif +} + void QXcbNativeInterface::setAppTime(QScreen* screen, xcb_timestamp_t time) { static_cast<QXcbScreen *>(screen->handle())->connection()->setTime(time); |