mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 02:41:51 +02:00
Qt: set popupparent if GetRealPopupParent returns form.Patch by Ondrej Pokorny. issue #29744
git-svn-id: trunk@51754 -
This commit is contained in:
parent
ee6b7820d9
commit
23680b8def
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user