diff --git a/lcl/interfaces/qt/qtobject.inc b/lcl/interfaces/qt/qtobject.inc index 4f8c24820b..942b303f58 100644 --- a/lcl/interfaces/qt/qtobject.inc +++ b/lcl/interfaces/qt/qtobject.inc @@ -850,6 +850,7 @@ begin DebugLn('TQtWidgetSet.EventFilter: Application is deactivated: ',dbgs(GetTickCount)); {$ENDIF} FAppActive := False; + ReleaseCapture; Application.IntfAppDeactivate; Result := True; end; diff --git a/lcl/interfaces/qt5/qtobject.inc b/lcl/interfaces/qt5/qtobject.inc index 48772e783c..9df433ef54 100644 --- a/lcl/interfaces/qt5/qtobject.inc +++ b/lcl/interfaces/qt5/qtobject.inc @@ -831,6 +831,7 @@ begin {$IF DEFINED(QTDEBUGAPPACTIVATE) OR DEFINED(VerboseQtEvents)} DebugLn('TQtWidgetSet.EventFilter: Application is deactivated: ',dbgs(GetTickCount)); {$ENDIF} + ReleaseCapture; Application.IntfAppDeactivate; Result := True; end;