summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kundrát <jkt@kde.org>2015-03-12 17:33:22 +0100
committerJan Kundrát <jkt@kde.org>2015-03-13 02:44:21 +0000
commite6a813c7869fb3677b15b3907bd6647b5f80bd5e (patch)
tree87168d29a6fe3e77a306430a3f153d2d4d78b71e
parentfbbd39ea7b005e70e32c6ed284c0779ce9958247 (diff)
Do not return null Display or Connection when there are no screensv5.5.0-rc1v5.5.0-beta1v5.5.0
This is a followup change for recent changes in QtGui which now handles a situation where there are no outputs, and hence a nullptr QScreen comes haunting us. Thanks to Martin Gräßlin for pointing out where the problem is, and to Richard Moore for explaining how to fix it. Change-Id: I8f70c7a0b232073d4edb55b29eb19dae9fc09413 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
-rw-r--r--src/x11extras/qx11info_x11.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/x11extras/qx11info_x11.cpp b/src/x11extras/qx11info_x11.cpp
index 4647bd6..8d8f337 100644
--- a/src/x11extras/qx11info_x11.cpp
+++ b/src/x11extras/qx11info_x11.cpp
@@ -338,7 +338,7 @@ Display *QX11Info::display()
if (!native)
return NULL;
- void *display = native->nativeResourceForScreen(QByteArray("display"), QGuiApplication::primaryScreen());
+ void *display = native->nativeResourceForIntegration(QByteArray("display"));
return reinterpret_cast<Display *>(display);
}
@@ -355,7 +355,7 @@ xcb_connection_t *QX11Info::connection()
if (!native)
return NULL;
- void *connection = native->nativeResourceForWindow(QByteArray("connection"), 0);
+ void *connection = native->nativeResourceForIntegration(QByteArray("connection"));
return reinterpret_cast<xcb_connection_t *>(connection);
}