diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2018-07-30 18:31:50 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2018-08-16 10:42:33 +0000 |
commit | 0f6b941ca54f9714627b8d5a94be163dc02126c1 (patch) | |
tree | 40f0d47ac1671f93f14e0bf0d32510a5c2e379fd /src/plugins/platforms/xcb/qxcbconnection.h | |
parent | 37bb907a921edab7e2ac675f82d93cc08e96fc01 (diff) |
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 <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index 697b509bf0..342efca55e 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -335,7 +335,7 @@ class QXcbWindowEventListener { public: virtual ~QXcbWindowEventListener() {} - virtual bool handleGenericEvent(xcb_generic_event_t *, long *) { return false; } + virtual bool handleNativeEvent(xcb_generic_event_t *) { return false; } virtual void handleExposeEvent(const xcb_expose_event_t *) {} virtual void handleClientMessageEvent(const xcb_client_message_event_t *) {} @@ -553,7 +553,6 @@ private: void initializeXShape(); void initializeXKB(); void initializeXSync(); - void handleClientMessageEvent(const xcb_client_message_event_t *event); QXcbScreen* findScreenForCrtc(xcb_window_t rootWindow, xcb_randr_crtc_t crtc) const; QXcbScreen* findScreenForOutput(xcb_window_t rootWindow, xcb_randr_output_t output) const; QXcbVirtualDesktop* virtualDesktopForRootWindow(xcb_window_t rootWindow) const; |