quartz: Add a function to get all toplevels

This will let us avoid frontend API for this.
This commit is contained in:
Matthias Clasen 2017-11-05 18:27:49 -05:00
parent 84a3772ef6
commit c44e693b26
2 changed files with 9 additions and 1 deletions

View File

@ -681,7 +681,7 @@ _gdk_quartz_window_did_resign_main (GdkWindow *window)
{
GList *toplevels;
toplevels = gdk_screen_get_toplevel_windows (_gdk_screen);
toplevels = gdk_display_get_toplevel_windows (_gdk_display);
if (toplevels)
new_window = toplevels->data;
g_list_free (toplevels);
@ -2954,3 +2954,10 @@ _gdk_root_window_impl_quartz_get_type (void)
return object_type;
}
GList *
get_toplevels (void)
{
update_toplevel_order ();
return GDK_WINDOW_IMPL_QUARTZ (_gdk_root->impl)->sorted_children;
}

View File

@ -108,6 +108,7 @@ struct _GdkRootWindowImplQuartzClass
GType _gdk_root_window_impl_quartz_get_type (void);
GList *get_toplevels (void);
G_END_DECLS