diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2017-05-11 11:51:25 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2017-05-16 07:54:46 +0000 |
commit | 59635288202b2ee468de95a79ac974c4d24bfdba (patch) | |
tree | e382821b6c9a18ab33cf19674e0f5e83dfb76cfa /src/plugins/platforms/xcb/qxcbconnection.cpp | |
parent | 5dc0e4b2857ea279c9481b03e73ebe9b82228197 (diff) |
xcb: rename QXcbConnection::{setButton,buttons,m_buttons}
... to {setButtonState,buttonState,m_buttonState}. This is more
consistent with the naming from XCB events:
xcb_button_press_event_t->state
xcb_button_release_event_t->state
xcb_motion_notify_event_t->state
Change-Id: I51ebb858defbdfee4a2009922178f0e58658e6b6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 66fa59bfea..dff1f7c396 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -1035,28 +1035,28 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) m_keyboard->updateXKBStateFromCore(ev->state); // the event explicitly contains the state of the three first buttons, // the rest we need to manage ourselves - m_buttons = (m_buttons & ~0x7) | translateMouseButtons(ev->state); - m_buttons |= translateMouseButton(ev->detail); + m_buttonState = (m_buttonState & ~0x7) | translateMouseButtons(ev->state); + m_buttonState |= translateMouseButton(ev->detail); if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled())) - qCDebug(lcQpaXInputEvents, "legacy mouse press, button %d state %X", ev->detail, static_cast<unsigned int>(m_buttons)); + qCDebug(lcQpaXInputEvents, "legacy mouse press, button %d state %X", ev->detail, static_cast<unsigned int>(m_buttonState)); HANDLE_PLATFORM_WINDOW_EVENT(xcb_button_press_event_t, event, handleButtonPressEvent); } case XCB_BUTTON_RELEASE: { xcb_button_release_event_t *ev = (xcb_button_release_event_t *)event; m_keyboard->updateXKBStateFromCore(ev->state); - m_buttons = (m_buttons & ~0x7) | translateMouseButtons(ev->state); - m_buttons &= ~translateMouseButton(ev->detail); + m_buttonState = (m_buttonState & ~0x7) | translateMouseButtons(ev->state); + m_buttonState &= ~translateMouseButton(ev->detail); if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled())) - qCDebug(lcQpaXInputEvents, "legacy mouse release, button %d state %X", ev->detail, static_cast<unsigned int>(m_buttons)); + qCDebug(lcQpaXInputEvents, "legacy mouse release, button %d state %X", ev->detail, static_cast<unsigned int>(m_buttonState)); HANDLE_PLATFORM_WINDOW_EVENT(xcb_button_release_event_t, event, handleButtonReleaseEvent); } case XCB_MOTION_NOTIFY: { xcb_motion_notify_event_t *ev = (xcb_motion_notify_event_t *)event; m_keyboard->updateXKBStateFromCore(ev->state); - m_buttons = (m_buttons & ~0x7) | translateMouseButtons(ev->state); + m_buttonState = (m_buttonState & ~0x7) | translateMouseButtons(ev->state); if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled())) qCDebug(lcQpaXInputEvents, "legacy mouse move %d,%d button %d state %X", ev->event_x, ev->event_y, - ev->detail, static_cast<unsigned int>(m_buttons)); + ev->detail, static_cast<unsigned int>(m_buttonState)); HANDLE_PLATFORM_WINDOW_EVENT(xcb_motion_notify_event_t, event, handleMotionNotifyEvent); } |