summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_x11.cpp
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2009-08-19 08:33:09 (GMT)
committerTrond Kjernåsen <trond@trolltech.com>2009-08-19 08:33:09 (GMT)
commitf38f4c02a2ac8b519305cb0bcdc00cd94eaf9a5a (patch)
tree3e0dd12af30f965bcba5d808ace2b99c612aefa4 /src/gui/kernel/qapplication_x11.cpp
parent40fef756b1e27aaceead7baaf3225c023f0da121 (diff)
downloadQt-f38f4c02a2ac8b519305cb0bcdc00cd94eaf9a5a.zip
Qt-f38f4c02a2ac8b519305cb0bcdc00cd94eaf9a5a.tar.gz
Qt-f38f4c02a2ac8b519305cb0bcdc00cd94eaf9a5a.tar.bz2
Fixed usage of the MITSHM extension for 16 bit X servers.
The server color layout test was a bit to harsh, since it excluded 16 bit X11 servers with RGB layout. Task-number: 259846 Reviewed-by: Gunnar
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r--src/gui/kernel/qapplication_x11.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 413e003..4c42d28 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -1959,9 +1959,12 @@ void qt_init(QApplicationPrivate *priv, int,
bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0;
if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) {
Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display));
- X11->use_mitshm = mitshm_pixmaps && (defaultVisual->red_mask == 0xff0000
- && defaultVisual->green_mask == 0xff00
- && defaultVisual->blue_mask == 0xff);
+ X11->use_mitshm = mitshm_pixmaps && ((defaultVisual->red_mask == 0xff0000
+ || defaultVisual->red_mask == 0xf800)
+ && (defaultVisual->green_mask == 0xff00
+ || defaultVisual->green_mask == 0x7e0)
+ && (defaultVisual->blue_mask == 0xff
+ || defaultVisual->blue_mask == 0x1f));
}
}
#endif // QT_NO_MITSHM