mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 11:39:55 +02:00
LCL-Gtk2: guard all gdk_window_get_state(Window) calls with GDK_IS_WINDOW(Window) checks to avoid Gtk2 warnings
This commit is contained in:
parent
d07ad17699
commit
10996cdfe2
@ -6536,7 +6536,7 @@ begin
|
|||||||
if GtkWindow = nil then
|
if GtkWindow = nil then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
Result := (PGtkWidget(GtkWindow)^.Window<>nil)
|
Result := (PGtkWidget(GtkWindow)^.Window<>nil) and GDK_IS_WINDOW(PGtkWidget(GtkWindow)^.Window)
|
||||||
and (gdk_window_get_state(PGtkWidget(GtkWindow)^.Window)
|
and (gdk_window_get_state(PGtkWidget(GtkWindow)^.Window)
|
||||||
and GDK_WINDOW_STATE_ICONIFIED <> 0);
|
and GDK_WINDOW_STATE_ICONIFIED <> 0);
|
||||||
end;
|
end;
|
||||||
@ -6600,7 +6600,7 @@ begin
|
|||||||
if GtkWindow = nil then
|
if GtkWindow = nil then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
Result := gdk_window_get_state(PGtkWidget(GtkWindow)^.Window) and GDK_WINDOW_STATE_MAXIMIZED <> 0;
|
Result := GDK_IS_WINDOW(PGtkWidget(GtkWindow)^.Window) and (gdk_window_get_state(PGtkWidget(GtkWindow)^.Window) and GDK_WINDOW_STATE_MAXIMIZED <> 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
@ -794,7 +794,7 @@ begin
|
|||||||
(AForm.PopupParent = nil) then
|
(AForm.PopupParent = nil) then
|
||||||
begin
|
begin
|
||||||
TempGdkWindow := {%H-}PGdkWindow(Gtk2WidgetSet.GetForegroundWindow);
|
TempGdkWindow := {%H-}PGdkWindow(Gtk2WidgetSet.GetForegroundWindow);
|
||||||
if (TempGdkWindow <> nil) and (GdkWindowObject_modal_hint(GDK_WINDOW_OBJECT(TempGdkWindow)^) = 0) then
|
if (TempGdkWindow <> nil) and GDK_IS_WINDOW(TempGdkWindow) 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
|
||||||
|
Loading…
Reference in New Issue
Block a user