summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@theqtcompany.com>2015-03-31 14:43:53 +0200
committerGatis Paeglis <gatis.paeglis@digia.com>2015-04-09 09:05:51 +0000
commit65d2b6b4df8d339177e640e5166d2a88088b8453 (patch)
treeb88ba37fd7bb1efba1ad6558f603424d4033d0b8 /src
parentaee9fef7ddad75ad280bb4565ce29a7478a29bac (diff)
Add missing event types in printXcbEvent
And replace Xlib define GenericEvent with XCB define XCB_GE_GENERIC. Change-Id: Ie82cb7f58b18fc0d253e4b7fd65495608df0a7d9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index f4c633e2d7..f0cd4c8484 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -83,6 +83,12 @@ Q_LOGGING_CATEGORY(lcQpaXInput, "qt.qpa.input")
Q_LOGGING_CATEGORY(lcQpaXInputDevices, "qt.qpa.input.devices")
Q_LOGGING_CATEGORY(lcQpaScreen, "qt.qpa.screen")
+// this event type was added in libxcb 1.10,
+// but we support also older version
+#ifndef XCB_GE_GENERIC
+#define XCB_GE_GENERIC 35
+#endif
+
#ifdef XCB_USE_XLIB
static const char * const xcbConnectionErrors[] = {
"No error", /* Error 0 */
@@ -666,6 +672,7 @@ void printXcbEvent(const char *message, xcb_generic_event_t *event)
PRINT_XCB_EVENT(XCB_KEYMAP_NOTIFY);
PRINT_XCB_EVENT(XCB_EXPOSE);
PRINT_XCB_EVENT(XCB_GRAPHICS_EXPOSURE);
+ PRINT_XCB_EVENT(XCB_NO_EXPOSURE);
PRINT_XCB_EVENT(XCB_VISIBILITY_NOTIFY);
PRINT_XCB_EVENT(XCB_CREATE_NOTIFY);
PRINT_XCB_EVENT(XCB_DESTROY_NOTIFY);
@@ -685,6 +692,8 @@ void printXcbEvent(const char *message, xcb_generic_event_t *event)
PRINT_XCB_EVENT(XCB_SELECTION_NOTIFY);
PRINT_XCB_EVENT(XCB_COLORMAP_NOTIFY);
PRINT_XCB_EVENT(XCB_CLIENT_MESSAGE);
+ PRINT_XCB_EVENT(XCB_MAPPING_NOTIFY);
+ PRINT_XCB_EVENT(XCB_GE_GENERIC);
default:
qDebug("QXcbConnection: %s: unknown event - response_type: %d - sequence: %d", message, int(event->response_type & ~0x80), int(event->sequence));
}
@@ -1080,7 +1089,7 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
HANDLE_PLATFORM_WINDOW_EVENT(xcb_property_notify_event_t, window, handlePropertyNotifyEvent);
break;
#if defined(XCB_USE_XINPUT2)
- case GenericEvent:
+ case XCB_GE_GENERIC:
if (m_xi2Enabled)
xi2HandleEvent(reinterpret_cast<xcb_ge_event_t *>(event));
break;