summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandinputdevice_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandinputdevice_p.h')
-rw-r--r--src/client/qwaylandinputdevice_p.h52
1 files changed, 31 insertions, 21 deletions
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h
index 9e3d1d1f4..8a02769e3 100644
--- a/src/client/qwaylandinputdevice_p.h
+++ b/src/client/qwaylandinputdevice_p.h
@@ -71,11 +71,17 @@
#endif
#include <QtCore/QDebug>
+#include <QPointer>
#if QT_CONFIG(cursor)
struct wl_cursor_image;
#endif
+#if QT_CONFIG(xkbcommon_evdev)
+struct xkb_compose_state;
+struct xkb_compose_table;
+#endif
+
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -141,27 +147,27 @@ private:
struct wl_display *mDisplay;
int mVersion;
- uint32_t mCaps;
+ uint32_t mCaps = 0;
struct wl_surface *pointerSurface;
#if QT_CONFIG(wayland_datadevice)
- QWaylandDataDevice *mDataDevice;
+ QWaylandDataDevice *mDataDevice = nullptr;
#endif
- Keyboard *mKeyboard;
- Pointer *mPointer;
- Touch *mTouch;
+ Keyboard *mKeyboard = nullptr;
+ Pointer *mPointer = nullptr;
+ Touch *mTouch = nullptr;
- QWaylandTextInput *mTextInput;
+ QWaylandTextInput *mTextInput = nullptr;
- uint32_t mTime;
- uint32_t mSerial;
+ uint32_t mTime = 0;
+ uint32_t mSerial = 0;
void seat_capabilities(uint32_t caps) override;
void handleTouchPoint(int id, double x, double y, Qt::TouchPointState state);
- QTouchDevice *mTouchDevice;
+ QTouchDevice *mTouchDevice = nullptr;
QSharedPointer<QWaylandBuffer> mPixmapCursor;
@@ -202,13 +208,15 @@ public:
uint32_t group) override;
QWaylandInputDevice *mParent;
- QWaylandWindow *mFocus;
+ QPointer<QWaylandWindow> mFocus;
#if QT_CONFIG(xkbcommon_evdev)
- xkb_context *mXkbContext;
- xkb_keymap *mXkbMap;
- xkb_state *mXkbState;
+ xkb_context *mXkbContext = nullptr;
+ xkb_keymap *mXkbMap = nullptr;
+ xkb_state *mXkbState = nullptr;
+ xkb_compose_table *mXkbComposeTable = nullptr;
+ xkb_compose_state *mXkbComposeState = nullptr;
#endif
- uint32_t mNativeModifiers;
+ uint32_t mNativeModifiers = 0;
int mRepeatKey;
uint32_t mRepeatCode;
@@ -228,6 +236,8 @@ private:
#if QT_CONFIG(xkbcommon_evdev)
bool createDefaultKeyMap();
void releaseKeyMap();
+ void createComposeState();
+ void releaseComposeState();
#endif
};
@@ -253,17 +263,17 @@ public:
void releaseButtons();
QWaylandInputDevice *mParent;
- QWaylandWindow *mFocus;
- uint32_t mEnterSerial;
+ QPointer<QWaylandWindow> mFocus;
+ uint32_t mEnterSerial = 0;
#if QT_CONFIG(cursor)
- uint32_t mCursorSerial;
+ uint32_t mCursorSerial = 0;
#endif
QPointF mSurfacePos;
QPointF mGlobalPos;
- Qt::MouseButtons mButtons;
+ Qt::MouseButtons mButtons = Qt::NoButton;
#if QT_CONFIG(cursor)
- wl_buffer *mCursorBuffer;
- Qt::CursorShape mCursorShape;
+ wl_buffer *mCursorBuffer = nullptr;
+ Qt::CursorShape mCursorShape = Qt::BitmapCursor;
#endif
};
@@ -293,7 +303,7 @@ public:
void releasePoints();
QWaylandInputDevice *mParent;
- QWaylandWindow *mFocus;
+ QPointer<QWaylandWindow> mFocus;
QList<QWindowSystemInterface::TouchPoint> mTouchPoints;
QList<QWindowSystemInterface::TouchPoint> mPrevTouchPoints;
};