[broadway] Keep track of all (toplevel) windows

This commit is contained in:
Alexander Larsson 2010-11-15 21:44:38 +01:00
parent c456e98880
commit 85515b7775

View File

@ -74,6 +74,8 @@ G_DEFINE_TYPE_WITH_CODE (GdkWindowImplX11,
G_IMPLEMENT_INTERFACE (GDK_TYPE_WINDOW_IMPL,
gdk_window_impl_iface_init));
static GList *all_windows;
GType
_gdk_window_impl_get_type (void)
{
@ -83,6 +85,7 @@ _gdk_window_impl_get_type (void)
static void
gdk_window_impl_x11_init (GdkWindowImplX11 *impl)
{
all_windows = g_list_prepend (all_windows, impl);
impl->toplevel_window_type = -1;
impl->device_cursor = g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) gdk_cursor_unref);
@ -115,6 +118,8 @@ gdk_window_impl_x11_finalize (GObject *object)
g_hash_table_destroy (window_impl->device_cursor);
all_windows = g_list_remove (all_windows, window_impl);
G_OBJECT_CLASS (gdk_window_impl_x11_parent_class)->finalize (object);
}