Qt: workaround for qt lib issue with modal windows minimizing (needed two clicks to minimize app) on X11. issue #20824

git-svn-id: trunk@33995 -
This commit is contained in:
zeljko 2011-12-06 13:43:56 +00:00
parent 72229752c8
commit e2870d69ef

View File

@ -383,23 +383,27 @@ begin
{$endif} {$endif}
{$ifdef HASX11} {$ifdef HASX11}
W := nil; if IsOldKDEInstallation then
ActiveWin := GetActiveWindow;
if ActiveWin <> 0 then
begin begin
if Assigned(TQtWidget(ActiveWin).LCLObject) then W := nil;
ActiveWin := GetActiveWindow;
if ActiveWin <> 0 then
begin begin
if (TQtWidget(ActiveWin).LCLObject is TCustomForm) then if Assigned(TQtWidget(ActiveWin).LCLObject) then
begin begin
with TCustomForm(TQtWidget(ActiveWin).LCLObject) do if (TQtWidget(ActiveWin).LCLObject is TCustomForm) then
begin begin
if Visible and (FormStyle <> fsSplash) then with TCustomForm(TQtWidget(ActiveWin).LCLObject) do
W := TQtWidget(Handle).Widget; begin
if Visible and (FormStyle <> fsSplash) then
W := TQtWidget(Handle).Widget;
end;
end; end;
end; end;
end; end;
end; QWidget_setParent(Widget.Widget, W);
QWidget_setParent(Widget.Widget, W); end else
QWidget_setParent(Widget.Widget, QApplication_desktop());
{$endif} {$endif}
QWidget_setWindowFlags(Widget.Widget, QtDialog or QWidget_setWindowFlags(Widget.Widget, QtDialog or