mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-06 19:59:45 +01:00
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:
parent
2380c4e2bb
commit
1890ef17b7
@ -756,7 +756,7 @@ begin
|
|||||||
(TCustomForm(AWinControl).PopupParent = nil) then
|
(TCustomForm(AWinControl).PopupParent = nil) then
|
||||||
begin
|
begin
|
||||||
TempGdkWindow := PGdkWindow(Gtk2WidgetSet.GetForegroundWindow);
|
TempGdkWindow := PGdkWindow(Gtk2WidgetSet.GetForegroundWindow);
|
||||||
if (TempGdkWindow <> nil) then
|
if (TempGdkWindow <> nil) and (GdkWindowObject_modal_hint(GDK_WINDOW_OBJECT(TempGdkWindow)^) = 0) then
|
||||||
begin
|
begin
|
||||||
if ((gdk_window_get_state(TempGdkWindow) and GDK_WINDOW_STATE_ABOVE) = GDK_WINDOW_STATE_ABOVE) or
|
if ((gdk_window_get_state(TempGdkWindow) and GDK_WINDOW_STATE_ABOVE) = GDK_WINDOW_STATE_ABOVE) or
|
||||||
GTK2WidgetSet.GetAlwaysOnTopX11(TempGdkWindow) then
|
GTK2WidgetSet.GetAlwaysOnTopX11(TempGdkWindow) then
|
||||||
|
|||||||
@ -563,7 +563,7 @@ begin
|
|||||||
(TCustomForm(AWinControl).PopupParent = nil) then
|
(TCustomForm(AWinControl).PopupParent = nil) then
|
||||||
begin
|
begin
|
||||||
W := QApplication_activeWindow;
|
W := QApplication_activeWindow;
|
||||||
if W <> nil then
|
if (W <> nil) and (W <> QApplication_activeModalWidget) then
|
||||||
begin
|
begin
|
||||||
Flags := QWidget_windowFlags(W);
|
Flags := QWidget_windowFlags(W);
|
||||||
if (Flags and QtWindowStaysOnTopHint <> QtWindowStaysOnTopHint) and
|
if (Flags and QtWindowStaysOnTopHint <> QtWindowStaysOnTopHint) and
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user