Don't try to deliver event to destroyed window
Change-Id: If1c57250e2dc9e0d55767bbdfb15c3e3f5d9b333 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
This commit is contained in:
parent
a33cc54705
commit
3850310051
@ -183,7 +183,8 @@ void QWaylandDataDevice::data_device_enter(uint32_t serial, wl_surface *surface,
|
||||
|
||||
void QWaylandDataDevice::data_device_leave()
|
||||
{
|
||||
QWindowSystemInterface::handleDrag(m_dragWindow, 0, QPoint(), Qt::IgnoreAction);
|
||||
if (m_dragWindow)
|
||||
QWindowSystemInterface::handleDrag(m_dragWindow, 0, QPoint(), Qt::IgnoreAction);
|
||||
|
||||
QDrag *drag = static_cast<QWaylandDrag *>(QGuiApplicationPrivate::platformIntegration()->drag())->currentDrag();
|
||||
if (!drag) {
|
||||
|
@ -53,6 +53,7 @@
|
||||
//
|
||||
|
||||
#include <QObject>
|
||||
#include <QPointer>
|
||||
#include <QPoint>
|
||||
|
||||
#include <QtWaylandClient/private/qwayland-wayland.h>
|
||||
@ -106,7 +107,7 @@ private:
|
||||
QWaylandDisplay *m_display;
|
||||
QWaylandInputDevice *m_inputDevice;
|
||||
uint32_t m_enterSerial;
|
||||
QWindow *m_dragWindow;
|
||||
QPointer<QWindow> m_dragWindow;
|
||||
QPoint m_dragPoint;
|
||||
QScopedPointer<QWaylandDataOffer> m_dragOffer;
|
||||
QScopedPointer<QWaylandDataOffer> m_selectionOffer;
|
||||
|
Loading…
x
Reference in New Issue
Block a user