summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 999dc0630c..725c01f77d 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -409,6 +409,15 @@ public:
const xcb_setup_t *setup() const { return m_setup; }
const xcb_format_t *formatForDepth(uint8_t depth) const;
+ bool imageNeedsEndianSwap() const
+ {
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+ return m_setup->image_byte_order != XCB_IMAGE_ORDER_MSB_FIRST;
+#else
+ return m_setup->image_byte_order != XCB_IMAGE_ORDER_LSB_FIRST;
+#endif
+ }
+
QXcbKeyboard *keyboard() const { return m_keyboard; }
#ifndef QT_NO_CLIPBOARD
@@ -476,8 +485,9 @@ public:
xcb_window_t getSelectionOwner(xcb_atom_t atom) const;
xcb_window_t getQtSelectionOwner();
- void setButtonState(Qt::MouseButton button, bool down) { m_buttonState.setFlag(button, down); }
+ void setButtonState(Qt::MouseButton button, bool down);
Qt::MouseButtons buttonState() const { return m_buttonState; }
+ Qt::MouseButton button() const { return m_button; }
Qt::MouseButton translateMouseButton(xcb_button_t s);
QXcbWindow *focusWindow() const { return m_focusWindow; }
@@ -691,6 +701,7 @@ private:
bool has_render_extension = false;
Qt::MouseButtons m_buttonState = 0;
+ Qt::MouseButton m_button = Qt::NoButton;
QXcbWindow *m_focusWindow = nullptr;
QXcbWindow *m_mouseGrabber = nullptr;