Commit 6e802acd authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

new internal function which destroys the display's event source. Also

2005-11-16  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkevents-x11.c (_gdk_events_uninit): new internal
	function which destroys the display's event source. Also removes
	the source from the global display_sources list and unrefs it.

	* gdk/x11/gdkprivate-x11.h: declare the function.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose): call it
	instead of half-destroying the source here.
parent a77fd024
2005-11-16 Michael Natterer <mitch@imendio.com>
* gdk/x11/gdkevents-x11.c (_gdk_events_uninit): new internal
function which destroys the display's event source. Also removes
the source from the global display_sources list and unrefs it.
* gdk/x11/gdkprivate-x11.h: declare the function.
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose): call it
instead of half-destroying the source here.
2005-11-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_move): Fix a memory
......
2005-11-16 Michael Natterer <mitch@imendio.com>
* gdk/x11/gdkevents-x11.c (_gdk_events_uninit): new internal
function which destroys the display's event source. Also removes
the source from the global display_sources list and unrefs it.
* gdk/x11/gdkprivate-x11.h: declare the function.
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose): call it
instead of half-destroying the source here.
2005-11-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_move): Fix a memory
......
......@@ -726,11 +726,7 @@ gdk_display_x11_dispose (GObject *object)
for (i = 0; i < n_screens; i++)
_gdk_screen_close (display_x11->screens[i]);
if (display_x11->event_source)
{
g_source_destroy (display_x11->event_source);
display_x11->event_source = NULL;
}
_gdk_events_uninit (GDK_DISPLAY_OBJECT (object));
G_OBJECT_CLASS (parent_class)->dispose (object);
}
......
......@@ -230,6 +230,20 @@ _gdk_events_init (GdkDisplay *display)
NULL);
}
void
_gdk_events_uninit (GdkDisplay *display)
{
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
if (display_x11->event_source)
{
display_sources = g_list_remove (display_sources,
display_x11->event_source);
g_source_destroy (display_x11->event_source);
g_source_unref (display_x11->event_source);
display_x11->event_source = NULL;
}
}
/**
* gdk_events_pending:
......
......@@ -170,6 +170,7 @@ void _gdk_x11_events_init_screen (GdkScreen *screen);
void _gdk_x11_events_uninit_screen (GdkScreen *screen);
void _gdk_events_init (GdkDisplay *display);
void _gdk_events_uninit (GdkDisplay *display);
void _gdk_windowing_window_init (GdkScreen *screen);
void _gdk_visual_init (GdkScreen *screen);
void _gdk_dnd_init (GdkDisplay *display);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment