Qt5,Qt6: fixed restoring secondary minimized window. issue #40243

This commit is contained in:
Željan Rikalo 2024-11-20 08:31:14 +01:00
parent 9846c0c8f4
commit 107d8dbeae
2 changed files with 8 additions and 6 deletions

View File

@ -2010,7 +2010,6 @@ begin
Result := SIMPLEREGION
else
Result := COMPLEXREGION;
finally
QRegion_destroy(ClipRegion);
QRegion_destroy(Region);
@ -5996,7 +5995,7 @@ begin
{$note this should return current system active window, not
application one, if our app isn''t active.
This is per MSDN and pretty win32 specific}
if WindowManagerName = 'metacity' then
if not IsWayland and (WindowManagerName = 'metacity') then
Result := HwndFromWidgetH(X11GetActivewindow)
else
Result := GetActiveWindow;
@ -6011,7 +6010,9 @@ begin
if HWND <> 0 then
begin
Result := TQtWidget(HWND).IsActiveWindow;
TQtWidget(HWnd).Activate;
if (TQtWidget(Hwnd).getWindowState and QtWindowMinimized) = QtWindowMinimized then
TQtWidget(Hwnd).ShowNormal;
TQtWidget(HWnd).BringToFront;
end;
end;

View File

@ -2007,7 +2007,6 @@ begin
Result := SIMPLEREGION
else
Result := COMPLEXREGION;
finally
QRegion_destroy(ClipRegion);
QRegion_destroy(Region);
@ -6038,7 +6037,7 @@ begin
{$note this should return current system active window, not
application one, if our app isn''t active.
This is per MSDN and pretty win32 specific}
if WindowManagerName = 'metacity' then
if not IsWayland and (WindowManagerName = 'metacity') then
Result := HwndFromWidgetH(X11GetActivewindow)
else
Result := GetActiveWindow;
@ -6053,7 +6052,9 @@ begin
if HWND <> 0 then
begin
Result := TQtWidget(HWND).IsActiveWindow;
TQtWidget(HWnd).Activate;
if (TQtWidget(Hwnd).getWindowState and QtWindowMinimized) = QtWindowMinimized then
TQtWidget(Hwnd).ShowNormal;
TQtWidget(HWnd).BringToFront;
end;
end;