Windows QPA: handle pointer messages received during a drag and drop

It seems the pointer message handler was skipping the handling of touch
and pen messages during a drag and drop operation, preventing the
generation of events that quick was expecting and triggering a crash
inside MouseArea.

Fixes: QTBUG-73120
Change-Id: I2921e38dd7e44846607e6c614d7393cfa5664c69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Andre de la Rocha 2019-01-28 14:01:48 +01:00
parent 3a9240428c
commit 850858cce6

View File

@ -174,15 +174,6 @@ static void flushTabletEvents()
}
}
static bool draggingActive()
{
#if QT_CONFIG(draganddrop)
return QWindowsDrag::isDragging();
#else
return false;
#endif
}
bool QWindowsPointerHandler::translatePointerEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result)
{
*result = 0;
@ -636,9 +627,6 @@ bool QWindowsPointerHandler::translateTouchEvent(QWindow *window, HWND hwnd,
if (et & QtWindows::NonClientEventFlag)
return false; // Let DefWindowProc() handle Non Client messages.
if (draggingActive())
return false; // Let DoDragDrop() loop handle it.
if (count < 1)
return false;
@ -739,9 +727,6 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
if (et & QtWindows::NonClientEventFlag)
return false; // Let DefWindowProc() handle Non Client messages.
if (draggingActive())
return false; // Let DoDragDrop() loop handle it.
POINTER_PEN_INFO *penInfo = static_cast<POINTER_PEN_INFO *>(vPenInfo);
RECT pRect, dRect;