Client: Use QPointer for focus members of input device capabilities
Change-Id: I2824269f89fddb7e276cf0e35df3f7c063b6d8b3 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
This commit is contained in:
parent
2b32defc38
commit
a6257efe0c
@ -272,14 +272,8 @@ QWaylandInputDevice::Touch *QWaylandInputDevice::createTouch(QWaylandInputDevice
|
|||||||
|
|
||||||
void QWaylandInputDevice::handleWindowDestroyed(QWaylandWindow *window)
|
void QWaylandInputDevice::handleWindowDestroyed(QWaylandWindow *window)
|
||||||
{
|
{
|
||||||
if (mPointer && window == mPointer->mFocus)
|
if (mKeyboard && window == mKeyboard->mFocus)
|
||||||
mPointer->mFocus = 0;
|
|
||||||
if (mKeyboard && window == mKeyboard->mFocus) {
|
|
||||||
mKeyboard->mFocus = 0;
|
|
||||||
mKeyboard->stopRepeat();
|
mKeyboard->stopRepeat();
|
||||||
}
|
|
||||||
if (mTouch && window == mTouch->mFocus)
|
|
||||||
mTouch->mFocus = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandInputDevice::handleEndDrag()
|
void QWaylandInputDevice::handleEndDrag()
|
||||||
|
@ -71,6 +71,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
#if QT_CONFIG(cursor)
|
#if QT_CONFIG(cursor)
|
||||||
struct wl_cursor_image;
|
struct wl_cursor_image;
|
||||||
@ -202,7 +203,7 @@ public:
|
|||||||
uint32_t group) override;
|
uint32_t group) override;
|
||||||
|
|
||||||
QWaylandInputDevice *mParent;
|
QWaylandInputDevice *mParent;
|
||||||
QWaylandWindow *mFocus;
|
QPointer<QWaylandWindow> mFocus;
|
||||||
#if QT_CONFIG(xkbcommon_evdev)
|
#if QT_CONFIG(xkbcommon_evdev)
|
||||||
xkb_context *mXkbContext;
|
xkb_context *mXkbContext;
|
||||||
xkb_keymap *mXkbMap;
|
xkb_keymap *mXkbMap;
|
||||||
@ -253,7 +254,7 @@ public:
|
|||||||
void releaseButtons();
|
void releaseButtons();
|
||||||
|
|
||||||
QWaylandInputDevice *mParent;
|
QWaylandInputDevice *mParent;
|
||||||
QWaylandWindow *mFocus;
|
QPointer<QWaylandWindow> mFocus;
|
||||||
uint32_t mEnterSerial;
|
uint32_t mEnterSerial;
|
||||||
#if QT_CONFIG(cursor)
|
#if QT_CONFIG(cursor)
|
||||||
uint32_t mCursorSerial;
|
uint32_t mCursorSerial;
|
||||||
@ -293,7 +294,7 @@ public:
|
|||||||
void releasePoints();
|
void releasePoints();
|
||||||
|
|
||||||
QWaylandInputDevice *mParent;
|
QWaylandInputDevice *mParent;
|
||||||
QWaylandWindow *mFocus;
|
QPointer<QWaylandWindow> mFocus;
|
||||||
QList<QWindowSystemInterface::TouchPoint> mTouchPoints;
|
QList<QWindowSystemInterface::TouchPoint> mTouchPoints;
|
||||||
QList<QWindowSystemInterface::TouchPoint> mPrevTouchPoints;
|
QList<QWindowSystemInterface::TouchPoint> mPrevTouchPoints;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user