quartz: Drop use of gdk_display_get_toplevel_windows
authorMatthias Clasen <mclasen@redhat.com>
Sun, 5 Nov 2017 23:28:27 +0000 (18:28 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 5 Nov 2017 23:28:27 +0000 (18:28 -0500)
We can use the newly added helper function for this.

gdk/quartz/GdkQuartzNSWindow.c
gdk/quartz/gdkscreen-quartz.c

index bf366c0d1a9549f1b89361f5b809fc0a027a5513..f6c50bc4f0f59b78ad618cfcc710ce8c3d2fdaad 100644 (file)
@@ -727,7 +727,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
 
       event->dnd.context->dest_window = NULL;
 
-      windows = gdk_display_get_toplevel_windows (display);
+      windows = get_toplevels ();
       _gdk_quartz_window_nspoint_to_gdk_xy (aPoint, &gx, &gy);
 
       for (list = windows; list; list = list->next)
@@ -743,8 +743,6 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
           if (gx > wx && gy > wy && gx <= wx + ww && gy <= wy + wh)
             event->dnd.context->dest_window = win;
         }
-
-      g_list_free (windows);
     }
 
   device = gdk_drag_context_get_device (_gdk_quartz_drag_source_context);
index d3001d5b8a86f7259f4904093e96bfcf0da358d8..b4b8490e222ad235cf6b5aba971bcafb457aec3e 100644 (file)
@@ -214,12 +214,9 @@ _gdk_quartz_screen_update_window_sizes (GdkScreen *screen)
   _gdk_root->abs_x = 0;
   _gdk_root->abs_y = 0;
 
-  windows = gdk_display_get_toplevel_windows (GDK_QUARTZ_SCREEN (screen)->display);
-
+  windows = get_toplevels ();
   for (list = windows; list; list = list->next)
     _gdk_quartz_window_update_position (list->data);
-
-  g_list_free (windows);
 }
 
 static void