diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-25 12:22:50 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-25 12:23:22 +0100 |
commit | 709e40093e6081b18e0d3003e0a088e1a9b6f211 (patch) | |
tree | 0f7c729c13b5a17f11ce176906f62ef43ea895a2 /src/plugins/platforms/xcb/qxcbwindow.cpp | |
parent | 62cd369594dc39e06e8c7ec2c761cfedf5d9c9ba (diff) | |
parent | 34b14a8472f44f8517577756e033b92ebd4c5912 (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: Ie709286a14b452dae7abb59830f584bb33f1ccf5
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 1d8ba69e55..2253dfecef 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -207,6 +207,18 @@ static inline QImage::Format imageFormatForVisual(int depth, quint32 red_mask, q break; } qWarning("Unsupported screen format: depth: %d, red_mask: %x, blue_mask: %x", depth, red_mask, blue_mask); + + switch (depth) { + case 24: + qWarning("Using RGB32 fallback, if this works your X11 server is reporting a bad screen format."); + return QImage::Format_RGB32; + case 16: + qWarning("Using RGB16 fallback, if this works your X11 server is reporting a bad screen format."); + return QImage::Format_RGB16; + default: + break; + } + return QImage::Format_Invalid; } |