Qt: added define TQTMESSAGEBOXUSEPARENT to fix showing dialogs behind application on MacOSX.

git-svn-id: trunk@47600 -
This commit is contained in:
zeljko 2015-02-06 09:16:37 +00:00
parent 59b3e94a65
commit 5324546b91
2 changed files with 12 additions and 0 deletions

View File

@ -9,4 +9,8 @@
{$DEFINE QTCOCOA}
{$ENDIF}
{$DEFINE QTSCROLLABLEFORMS}
{$IFDEF DARWIN}
{enable this define if you have problems when dialogs are shown behind application}
{.$DEFINE TQTMESSAGEBOXUSEPARENT}
{$ENDIF}
{$ENDIF}

View File

@ -18400,6 +18400,10 @@ begin
LCLObject := nil;
FKeysToEat := [];
FHasPaint := False;
{$IFDEF TQTMESSAGEBOXUSEPARENT}
if AParent = nil then
AParent := QApplication_activeWindow;
{$ENDIF}
Widget := CreateWidget(AParent);
end;
@ -18509,6 +18513,10 @@ begin
if (QtWidgetSet.WindowManagerName = 'metacity') then
X11Raise(QWidget_winID(Widget));
{$ENDIF}
{$IFDEF TQTMESSAGEBOXUSEPARENT}
QWidget_activateWindow(Widget);
QWidget_raise(Widget);
{$ENDIF}
repeat
QCoreApplication_processEvents();