struct pgtk_device_t *rec;
GList *all_seats, *devices_on_seat, *tem, *t1;
GdkSeat *seat;
- char printbuf[1026]; /* Believe it or not, some device names are
- actually almost this long. */
block_input ();
all_seats = gdk_display_list_seats (dpyinfo->gdpy);
rec = xmalloc (sizeof *rec);
rec->seat = g_object_ref (seat);
rec->device = GDK_DEVICE (t1->data);
-
- int len = snprintf (printbuf, sizeof printbuf, "%u:%s",
- gdk_device_get_source (rec->device),
- gdk_device_get_name (rec->device));
- eassert (len < sizeof printbuf);
-
- rec->name = build_string (printbuf);
+ rec->name = (make_formatted_string
+ ("%u:%s",
+ gdk_device_get_source (rec->device),
+ gdk_device_get_name (rec->device)));
rec->next = dpyinfo->devices;
dpyinfo->devices = rec;
}