Qt: set popupparent if GetRealPopupParent returns form.Patch by Ondrej Pokorny. issue #29744

git-svn-id: trunk@51754 -
This commit is contained in:
zeljko 2016-02-29 12:05:49 +00:00
parent ee6b7820d9
commit 23680b8def

View File

@ -379,8 +379,10 @@ const
var
Widget: TQtMainWindow;
R: TRect;
{$IFDEF HASX11}
{$IF (DEFINED HASX11) OR DEFINED(MSWINDOWS)}
APopupParent: TCustomForm;
{$ENDIF}
{$IFDEF HASX11}
ActiveWin: HWND;
W: QWidgetH;
{$ENDIF}
@ -437,7 +439,11 @@ begin
if (TForm(AWinControl).BorderStyle in [bsToolWindow, bsSizeToolWin]) then
QWidget_setWindowFlags(Widget.Widget, QtDialog);
// show modal windows in taskbar, not above start button. issue #29744
QWidget_setParent(Widget.Widget, QApplication_desktop);
APopupParent := TCustomForm(AWinControl).GetRealPopupParent;
if (APopupParent <> nil) then
QWidget_setParent(Widget.Widget, TQtWidget(APopupParent.Handle).Widget)
else
QWidget_setParent(Widget.Widget, QApplication_desktop);
{$endif}
{$ifdef HASX11}