From 0f6b941ca54f9714627b8d5a94be163dc02126c1 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 30 Jul 2018 18:31:50 +0200 Subject: xcb: cleanup QXcbConnection::handleXcbEvent() - the usage of 'handled' variable was a mess. - remove "generic" from API names. The naming was probably influenced too much from underlying C API (xcb_generic_event_t): - handleGenericEvent() -> handleNativeEvent() to be consistent with QWindow::nativeEvent(). - dropped unnecessary 'long *result' from signature. It is useful only on MS Windows. - genericEventFilterType() -> nativeEventType(), it *is* an event type, not a filter type. - XCB_CLIENT_MESSAGE was not passed to QWindow::nativeEvent(), which is done via HANDLE_PLATFORM_WINDOW_EVENT. - minor: added some 'auto's where it makes sense and improved some variable names. Change-Id: Id1c9896054e2dbd9a79bacd88394149c8cf2cdea Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbwindow.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp') diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index fd0d2f9f07..2c333cb22b 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -1807,12 +1807,11 @@ bool QXcbWindow::requestSystemTrayWindowDock() return true; } -bool QXcbWindow::handleGenericEvent(xcb_generic_event_t *event, long *result) +bool QXcbWindow::handleNativeEvent(xcb_generic_event_t *event) { - return QWindowSystemInterface::handleNativeEvent(window(), - connection()->nativeInterface()->genericEventFilterType(), - event, - result); + auto eventType = connection()->nativeInterface()->nativeEventType(); + long result = 0; // Used only by MS Windows + return QWindowSystemInterface::handleNativeEvent(window(), eventType, event, &result); } void QXcbWindow::handleExposeEvent(const xcb_expose_event_t *event) -- cgit v1.2.3