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