Qt: fixed bad behaviour of modal forms and TQtMessageBox under metacity window manager. issue #19507

git-svn-id: trunk@31121 -
This commit is contained in:
zeljko 2011-06-06 16:33:11 +00:00
parent 779e0eea41
commit a452810bf5
2 changed files with 15 additions and 0 deletions

View File

@ -14251,6 +14251,12 @@ begin
{$ELSE}
QMessageBox_setWindowModality(QMessageBoxH(Widget), QtApplicationModal);
QWidget_show(Widget);
{$IFDEF HASX11}
if (QtWidgetSet.WindowManagerName = 'metacity') then
X11Raise(QWidget_winID(Widget));
{$ENDIF}
repeat
QCoreApplication_processEvents();
Application.Idle(true);

View File

@ -441,8 +441,17 @@ begin
end;
end;
end;
Widget.setVisible(AWinControl.HandleObjectShouldBeVisible);
Widget.EndUpdate;
{$IFDEF HASX11}
if AWinControl.HandleObjectShouldBeVisible and
(fsModal in TForm(AWinControl).FormState) and
(QtWidgetSet.WindowManagerName = 'metacity') then
X11Raise(QWidget_winID(Widget.Widget));
{$ENDIF}
{$IFDEF HASX11}
if (QtVersionMajor = 4) and (QtVersionMinor >= 6)
and (TForm(AWinControl).FormStyle <> fsMDIChild) then