summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbwindow.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-10 09:54:23 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-10 09:55:09 +0100
commit51ce5b482997f76b8890876b07337b29609728e5 (patch)
tree54f408028c7831428fca2772c6a909f2febffb54 /src/plugins/platforms/xcb/qxcbwindow.cpp
parent51ba25e0fc89882e5021bed718de91d58f7f3907 (diff)
parentd6ce94ae6367337ade2c590f182b973e2bcfa98c (diff)
Merge remote-tracking branch 'origin/5.4.1' into 5.4
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 96c5663d83..233514a181 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -215,6 +215,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;
}