summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-02-29 15:56:09 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-03-01 09:27:58 (GMT)
commit83493be5fc4387e81e4475856f2493dd02a9039a (patch)
tree05615879cb31f1abf499678453ba86591768a218
parente6bd33d4aef0e4538d7918e7ab130624c911b553 (diff)
downloadQt-83493be5fc4387e81e4475856f2493dd02a9039a.zip
Qt-83493be5fc4387e81e4475856f2493dd02a9039a.tar.gz
Qt-83493be5fc4387e81e4475856f2493dd02a9039a.tar.bz2
Fix xcb-icccm 3.8 support
Build fix on platforms having xcb-icccm >= 3.8 This is a backport of 7ce8491280990350162933a0716d1b014f65aeb6 and f005dee1b3692a09e47782dcff9b5b07aa659b51 from qtbase. Change-Id: Ic6cbb555335a74cc7b00273081c249aa7e08afaf Reviewed-by: Holger Freyther <holger+qt@freyther.de> Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 17083fc..3397f72 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -49,7 +49,32 @@
#include "qdri2context.h"
#endif
+// Fix xcb-icccm 3.8 support
+#define class class_name
#include <xcb/xcb_icccm.h>
+#undef class
+
+#ifdef XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS
+#define xcb_wm_hints_t xcb_icccm_wm_hints_t
+#define xcb_wm_hints_set_iconic xcb_icccm_wm_hints_set_iconic
+#define xcb_wm_hints_set_normal xcb_icccm_wm_hints_set_normal
+#define xcb_set_wm_hints xcb_icccm_set_wm_hints
+
+#define xcb_wm_hints_t xcb_icccm_wm_hints_t
+#define xcb_get_wm_hints_reply xcb_icccm_get_wm_hints_reply
+#define xcb_get_wm_hints xcb_icccm_get_wm_hints
+#define xcb_set_wm_hints xcb_icccm_set_wm_hints
+#define xcb_set_wm_normal_hints xcb_icccm_set_wm_normal_hints
+#define xcb_size_hints_set_base_size xcb_icccm_size_hints_set_base_size
+#define xcb_size_hints_set_max_size xcb_icccm_size_hints_set_max_size
+#define xcb_size_hints_set_min_size xcb_icccm_size_hints_set_min_size
+#define xcb_size_hints_set_position xcb_icccm_size_hints_set_position
+#define xcb_size_hints_set_resize_inc xcb_icccm_size_hints_set_resize_inc
+#define xcb_size_hints_set_size xcb_icccm_size_hints_set_size
+#define xcb_size_hints_set_win_gravity xcb_icccm_size_hints_set_win_gravity
+#define xcb_wm_hints_t xcb_icccm_wm_hints_t
+#define XCB_WM_STATE_ICONIC XCB_ICCCM_WM_STATE_ICONIC
+#endif
#include <private/qapplication_p.h>
#include <private/qwindowsurface_p.h>