From f38f4c02a2ac8b519305cb0bcdc00cd94eaf9a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 19 Aug 2009 10:33:09 +0200 Subject: 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 --- src/gui/kernel/qapplication_x11.cpp | 9 ++++++--- 1 file 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 -- cgit v0.12