lcl: qt: revert wrong change for modal windows from r51032 #81733b2e74

git-svn-id: trunk@51036 -
This commit is contained in:
ondrej 2015-12-26 12:30:00 +00:00
parent 784fb5ccb6
commit 0703a58eca

View File

@ -441,9 +441,23 @@ begin
(QtWidgetSet.WindowManagerName = 'xfwm4') or
(QtWidgetSet.WindowManagerName = 'metacity') then
begin
APopupParent := TCustomForm(AWinControl).GetRealPopupParent;
if APopupParent <> nil then
QWidget_setParent(Widget.Widget, TQtWidget(APopupParent.Handle).Widget);
W := nil;
ActiveWin := GetActiveWindow;
if ActiveWin <> 0 then
begin
if Assigned(TQtWidget(ActiveWin).LCLObject) then
begin
if (TQtWidget(ActiveWin).LCLObject is TCustomForm) then
begin
with TCustomForm(TQtWidget(ActiveWin).LCLObject) do
begin
if Visible and (FormStyle <> fsSplash) then
W := TQtWidget(Handle).Widget;
end;
end;
end;
end;
QWidget_setParent(Widget.Widget, W);
end else
QWidget_setParent(Widget.Widget, QApplication_desktop());
{$endif}