diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-04-23 11:17:59 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-04-23 11:17:59 (GMT) |
commit | d1f67f4287b7536b068672fbb7fd31ad02306ca3 (patch) | |
tree | 7012b90a083a1976bd1d68707290699d5fc08b47 /src/gui/kernel | |
parent | e8974548e30a28738b46c681a7e50c27aab27db6 (diff) | |
parent | 148cb8d26d46067676677fde1cfb81d5d5c6d81b (diff) | |
download | Qt-d1f67f4287b7536b068672fbb7fd31ad02306ca3.zip Qt-d1f67f4287b7536b068672fbb7fd31ad02306ca3.tar.gz Qt-d1f67f4287b7536b068672fbb7fd31ad02306ca3.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 4814f1a..d7ca2f4 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -402,7 +402,7 @@ extern bool qt_xdnd_dragging; // gui or non-gui from qapplication.cpp extern bool qt_is_gui_used; -/*! +/*! \internal Try to resolve a \a symbol from \a library with the version specified by \a vernum. @@ -840,7 +840,7 @@ bool QApplicationPrivate::x11_apply_settings() } int kdeSessionVersion = QString::fromLocal8Bit(qgetenv("KDE_SESSION_VERSION")).toInt(); - + if (!appFont) { QFont font(QApplication::font()); QString fontDescription; @@ -1953,11 +1953,17 @@ void qt_init(QApplicationPrivate *priv, int, { QString displayName = QLatin1String(XDisplayName(NULL)); - // apparently MITSHM only works for local displays, so do a quick check here - // to determine whether the display is local or not (not 100 % accurate) + // MITSHM only works for local displays, so do a quick check here + // to determine whether the display is local or not (not 100 % accurate). + // BGR server layouts are not supported either, since it requires the raster + // engine to work on a QImage with BGR layout. bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0; - if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) - X11->use_mitshm = mitshm_pixmaps; + 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); + } } #endif // QT_NO_MITSHM |