[gtk/present-toplevel-2: 71/79] surface: Only notify state on toplevels



commit 7557b9b3aba083bd5a854143456f5e951df6bb38
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 7 14:36:55 2020 -0800

    surface: Only notify state on toplevels
    
    Other kinds of surfaces don't have this property.

 gdk/gdksurface.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 6b3dc0542b..d33d860a9e 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -982,7 +982,8 @@ _gdk_surface_destroy_hierarchy (GdkSurface *surface,
 
   surface_remove_from_pointer_info (surface, surface->display);
 
-  g_object_notify (G_OBJECT (surface), "state");
+  if (GDK_IS_TOPLEVEL (surface))
+    g_object_notify (G_OBJECT (surface), "state");
   g_object_notify_by_pspec (G_OBJECT (surface), properties[PROP_MAPPED]);
 }
 
@@ -3182,7 +3183,8 @@ gdk_surface_set_state (GdkSurface      *surface,
 
   _gdk_surface_update_viewable (surface);
 
-  g_object_notify (G_OBJECT (surface), "state");
+  if (GDK_IS_TOPLEVEL (surface))
+    g_object_notify (G_OBJECT (surface), "state");
 
   if (was_mapped != mapped)
     g_object_notify_by_pspec (G_OBJECT (surface), properties[PROP_MAPPED]);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]