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)
|
||||
{
|
||||
if (mPointer && window == mPointer->mFocus)
|
||||
mPointer->mFocus = 0;
|
||||
if (mKeyboard && window == mKeyboard->mFocus) {
|
||||
mKeyboard->mFocus = 0;
|
||||
if (mKeyboard && window == mKeyboard->mFocus)
|
||||
mKeyboard->stopRepeat();
|
||||
}
|
||||
if (mTouch && window == mTouch->mFocus)
|
||||
mTouch->mFocus = 0;
|
||||
}
|
||||
|
||||
void QWaylandInputDevice::handleEndDrag()
|
||||
|
@ -71,6 +71,7 @@
|
||||
#endif
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QPointer>
|
||||
|
||||
#if QT_CONFIG(cursor)
|
||||
struct wl_cursor_image;
|
||||
@ -202,7 +203,7 @@ public:
|
||||
uint32_t group) override;
|
||||
|
||||
QWaylandInputDevice *mParent;
|
||||
QWaylandWindow *mFocus;
|
||||
QPointer<QWaylandWindow> mFocus;
|
||||
#if QT_CONFIG(xkbcommon_evdev)
|
||||
xkb_context *mXkbContext;
|
||||
xkb_keymap *mXkbMap;
|
||||
@ -253,7 +254,7 @@ public:
|
||||
void releaseButtons();
|
||||
|
||||
QWaylandInputDevice *mParent;
|
||||
QWaylandWindow *mFocus;
|
||||
QPointer<QWaylandWindow> mFocus;
|
||||
uint32_t mEnterSerial;
|
||||
#if QT_CONFIG(cursor)
|
||||
uint32_t mCursorSerial;
|
||||
@ -293,7 +294,7 @@ public:
|
||||
void releasePoints();
|
||||
|
||||
QWaylandInputDevice *mParent;
|
||||
QWaylandWindow *mFocus;
|
||||
QPointer<QWaylandWindow> mFocus;
|
||||
QList<QWindowSystemInterface::TouchPoint> mTouchPoints;
|
||||
QList<QWindowSystemInterface::TouchPoint> mPrevTouchPoints;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user