From 84095febed8a6360d11fae71c1b17729ae688dfc Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 8 Mar 2020 09:20:07 -0700 Subject: [PATCH] x11: Only use state of toplevels Other surface subtypes don't have that property. --- gdk/x11/gdkmonitor-x11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdk/x11/gdkmonitor-x11.c b/gdk/x11/gdkmonitor-x11.c index 341917ad8c..85e1924053 100644 --- a/gdk/x11/gdkmonitor-x11.c +++ b/gdk/x11/gdkmonitor-x11.c @@ -44,6 +44,9 @@ gdk_monitor_has_fullscreen_window (GdkMonitor *monitor) { surface = l->data; + if (!GDK_IS_TOPLEVEL (surface)) + continue; + if ((gdk_toplevel_get_state (GDK_TOPLEVEL (surface)) & GDK_SURFACE_STATE_FULLSCREEN) == 0) continue;