Really don't leak a control if we quit between a MouseDown and a MouseUp event.

[GB.QT5]
* BUG: Really don't leak a control if we quit between a MouseDown and a MouseUp event.
This commit is contained in:
gambas 2021-03-15 20:59:42 +01:00
parent 5b6cff7071
commit 1dd3ff609d

View File

@ -772,6 +772,7 @@ static void hook_quit()
CWINDOW_close_all(true); CWINDOW_close_all(true);
CWINDOW_delete_all(true); CWINDOW_delete_all(true);
CMOUSE_set_control(NULL);
qApp->sendPostedEvents(); //processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::DeferredDeletion, 0); qApp->sendPostedEvents(); //processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::DeferredDeletion, 0);
qApp->sendPostedEvents(0, QEvent::DeferredDelete); qApp->sendPostedEvents(0, QEvent::DeferredDelete);