Qt,Gtk2: fixed crash introduced with r44723 #e92a302d5b,44724 #4987038ee9 when popup window is shown above modal form. issue #26018

git-svn-id: trunk@44731 -
This commit is contained in:
zeljko 2014-04-14 18:15:57 +00:00
parent 2380c4e2bb
commit 1890ef17b7
2 changed files with 2 additions and 2 deletions

View File

@ -756,7 +756,7 @@ begin
(TCustomForm(AWinControl).PopupParent = nil) then
begin
TempGdkWindow := PGdkWindow(Gtk2WidgetSet.GetForegroundWindow);
if (TempGdkWindow <> nil) then
if (TempGdkWindow <> nil) and (GdkWindowObject_modal_hint(GDK_WINDOW_OBJECT(TempGdkWindow)^) = 0) then
begin
if ((gdk_window_get_state(TempGdkWindow) and GDK_WINDOW_STATE_ABOVE) = GDK_WINDOW_STATE_ABOVE) or
GTK2WidgetSet.GetAlwaysOnTopX11(TempGdkWindow) then

View File

@ -563,7 +563,7 @@ begin
(TCustomForm(AWinControl).PopupParent = nil) then
begin
W := QApplication_activeWindow;
if W <> nil then
if (W <> nil) and (W <> QApplication_activeModalWidget) then
begin
Flags := QWidget_windowFlags(W);
if (Flags and QtWindowStaysOnTopHint <> QtWindowStaysOnTopHint) and