forked from AuroraMiddleware/gtk
Use g_source_set_name for all custom GSources in GTK+
Naming the sources allows easier debugging with e.g. SystemTap probes. https://bugzilla.gnome.org/show_bug.cgi?id=620511
This commit is contained in:
parent
b96a05b81f
commit
95bc0f5405
@ -987,6 +987,7 @@ _gdk_quartz_event_loop_init (void)
|
||||
event_poll_fd.fd = -1;
|
||||
|
||||
source = g_source_new (&event_funcs, sizeof (GSource));
|
||||
g_source_set_name (source, "GDK Quartz event source");
|
||||
g_source_add_poll (source, &event_poll_fd);
|
||||
g_source_set_priority (source, GDK_PRIORITY_EVENTS);
|
||||
g_source_set_can_recurse (source, TRUE);
|
||||
|
@ -393,6 +393,7 @@ _gdk_events_init (void)
|
||||
#endif
|
||||
|
||||
source = g_source_new (&event_funcs, sizeof (GSource));
|
||||
g_source_set_name (source, "GDK Win32 event source");
|
||||
g_source_set_priority (source, GDK_PRIORITY_EVENTS);
|
||||
|
||||
#ifdef G_WITH_CYGWIN
|
||||
|
@ -322,8 +322,13 @@ gdk_event_source_new (GdkDisplay *display)
|
||||
GdkEventSource *event_source;
|
||||
GdkDisplayX11 *display_x11;
|
||||
int connection_number;
|
||||
char *name;
|
||||
|
||||
source = g_source_new (&event_funcs, sizeof (GdkEventSource));
|
||||
name = g_strdup_printf ("GDK X11 Event source (%s)",
|
||||
gdk_display_get_name (display));
|
||||
g_source_set_name (source, name);
|
||||
g_free (name);
|
||||
event_source = (GdkEventSource *) source;
|
||||
event_source->display = display;
|
||||
|
||||
|
@ -1248,6 +1248,7 @@ cups_request_execute (GtkPrintBackendCups *print_backend,
|
||||
|
||||
dispatch = (GtkPrintCupsDispatchWatch *) g_source_new (&_cups_dispatch_watch_funcs,
|
||||
sizeof (GtkPrintCupsDispatchWatch));
|
||||
g_source_set_name (dispatch, "GTK+ CUPS backend");
|
||||
|
||||
GTK_NOTE (PRINTING,
|
||||
g_print ("CUPS Backend: %s <source %p> - Executing cups request on server '%s' and resource '%s'\n", G_STRFUNC, dispatch, request->server, request->resource));
|
||||
|
Loading…
Reference in New Issue
Block a user