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

[GB.QT4]
* BUG: Don't leak a control if we quit between a MouseDown and a MouseUp event.

[GB.QT5]
* BUG: Don't leak a control if we quit between a MouseDown and a MouseUp event.
This commit is contained in:
gambas 2021-03-15 01:00:22 +01:00
parent daaec0f257
commit 001050aea2

View file

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