diff options
author | Water-Team <water@pad.test.qt.nokia.com> | 2011-10-10 23:00:14 (GMT) |
---|---|---|
committer | Water-Team <water@pad.test.qt.nokia.com> | 2011-10-10 23:00:14 (GMT) |
commit | 3e7056ad406d59eb4a052f02f82ba92ab474ea0e (patch) | |
tree | 3106d240d8fb0a70d340c33a0f8269fd4a3f96bc /src/gui/kernel | |
parent | ecd78168271cfe71715e074a50752712f4aa3229 (diff) | |
parent | 22d7b6c1afb3e8558941052b09f755cceb0a46fd (diff) | |
download | Qt-3e7056ad406d59eb4a052f02f82ba92ab474ea0e.zip Qt-3e7056ad406d59eb4a052f02f82ba92ab474ea0e.tar.gz Qt-3e7056ad406d59eb4a052f02f82ba92ab474ea0e.tar.bz2 |
Merge branch '4.8-upstream' into master-water
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qt_x11_p.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index ef8e2b8..408e9ac 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -1896,6 +1896,12 @@ void qt_init(QApplicationPrivate *priv, int, X11->defaultScreen = DefaultScreen(X11->display); X11->screenCount = ScreenCount(X11->display); + int formatCount = 0; + XPixmapFormatValues *values = XListPixmapFormats(X11->display, &formatCount); + for (int i = 0; i < formatCount; ++i) + X11->bppForDepth[values[i].depth] = values[i].bits_per_pixel; + XFree(values); + X11->screens = new QX11InfoData[X11->screenCount]; X11->argbVisuals = new Visual *[X11->screenCount]; X11->argbColormaps = new Colormap[X11->screenCount]; diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h index 72acaf3..fe4a631 100644 --- a/src/gui/kernel/qt_x11_p.h +++ b/src/gui/kernel/qt_x11_p.h @@ -54,6 +54,7 @@ // #include "QtGui/qwindowdefs.h" +#include "QtCore/qhash.h" #include "QtCore/qlist.h" #include "QtCore/qvariant.h" @@ -467,6 +468,7 @@ struct QX11Data Colormap *argbColormaps; int screenCount; int defaultScreen; + QHash<int, int> bppForDepth; Time time; Time userTime; |