diff options
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 9 |
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 |