mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 15:59:13 +02:00
Qt: fixed minimizing app when modal form is minimized. part of issue #26463
git-svn-id: trunk@51698 -
This commit is contained in:
parent
e7a547348e
commit
d21ede8cea
@ -7270,7 +7270,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
AForm := Screen.CustomFormsZOrdered[i];
|
AForm := Screen.CustomFormsZOrdered[i];
|
||||||
if (AForm <> Application.MainForm) and
|
if (AForm <> Application.MainForm) and
|
||||||
(AForm.FormStyle in [fsStayOnTop, fsSystemStayOnTop]) and
|
// (AForm.FormStyle in [fsStayOnTop, fsSystemStayOnTop]) and
|
||||||
AForm.HandleAllocated and AForm.Visible then
|
AForm.HandleAllocated and AForm.Visible then
|
||||||
begin
|
begin
|
||||||
W := TQtWidget(AForm.Handle).Widget;
|
W := TQtWidget(AForm.Handle).Widget;
|
||||||
@ -7298,7 +7298,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
AForm := Screen.CustomFormsZOrdered[i];
|
AForm := Screen.CustomFormsZOrdered[i];
|
||||||
if (AForm <> Application.MainForm) and
|
if (AForm <> Application.MainForm) and
|
||||||
(AForm.FormStyle in [fsStayOnTop, fsSystemStayOnTop]) and
|
// (AForm.FormStyle in [fsStayOnTop, fsSystemStayOnTop]) and
|
||||||
AForm.HandleAllocated and AForm.Visible then
|
AForm.HandleAllocated and AForm.Visible then
|
||||||
begin
|
begin
|
||||||
W := TQtWidget(AForm.Handle).Widget;
|
W := TQtWidget(AForm.Handle).Widget;
|
||||||
@ -7334,6 +7334,17 @@ begin
|
|||||||
begin
|
begin
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
AForm := TCustomForm(LCLObject);
|
AForm := TCustomForm(LCLObject);
|
||||||
|
if (fsModal in AForm.FormState) then
|
||||||
|
begin
|
||||||
|
AOldState := QWindowStateChangeEvent_oldState(QWindowStateChangeEventH(Event));
|
||||||
|
AState := GetWindowState;
|
||||||
|
SlotWindowStateChange;
|
||||||
|
if (AState and QtWindowMinimized = QtWindowMinimized) and (AOldState and QtWindowMinimized = 0) then
|
||||||
|
Application.Minimize
|
||||||
|
else
|
||||||
|
if (AOldState and QtWindowMinimized = QtWindowMinimized) and (AState and QtWindowMinimized = 0) then
|
||||||
|
Application.Restore;
|
||||||
|
end else
|
||||||
if (AForm.FormStyle in [fsStayOnTop, fsSystemStayOnTop]) and InUpdate then
|
if (AForm.FormStyle in [fsStayOnTop, fsSystemStayOnTop]) and InUpdate then
|
||||||
// do not trigger LCL
|
// do not trigger LCL
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user