aboutsummaryrefslogtreecommitdiffstats
path: root/src/pgtkterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pgtkterm.c')
-rw-r--r--src/pgtkterm.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 1f468300deb..dd85d622a62 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -158,8 +158,6 @@ pgtk_enumerate_devices (struct pgtk_display_info *dpyinfo,
158 struct pgtk_device_t *rec; 158 struct pgtk_device_t *rec;
159 GList *all_seats, *devices_on_seat, *tem, *t1; 159 GList *all_seats, *devices_on_seat, *tem, *t1;
160 GdkSeat *seat; 160 GdkSeat *seat;
161 char printbuf[1026]; /* Believe it or not, some device names are
162 actually almost this long. */
163 161
164 block_input (); 162 block_input ();
165 all_seats = gdk_display_list_seats (dpyinfo->gdpy); 163 all_seats = gdk_display_list_seats (dpyinfo->gdpy);
@@ -187,13 +185,10 @@ pgtk_enumerate_devices (struct pgtk_display_info *dpyinfo,
187 rec = xmalloc (sizeof *rec); 185 rec = xmalloc (sizeof *rec);
188 rec->seat = g_object_ref (seat); 186 rec->seat = g_object_ref (seat);
189 rec->device = GDK_DEVICE (t1->data); 187 rec->device = GDK_DEVICE (t1->data);
190 188 rec->name = (make_formatted_string
191 int len = snprintf (printbuf, sizeof printbuf, "%u:%s", 189 ("%u:%s",
192 gdk_device_get_source (rec->device), 190 gdk_device_get_source (rec->device),
193 gdk_device_get_name (rec->device)); 191 gdk_device_get_name (rec->device)));
194 eassert (len < sizeof printbuf);
195
196 rec->name = build_string (printbuf);
197 rec->next = dpyinfo->devices; 192 rec->next = dpyinfo->devices;
198 dpyinfo->devices = rec; 193 dpyinfo->devices = rec;
199 } 194 }