mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-04 11:23:24 +00:00
* src/pgtkterm.c (pgtk_enumerate_devices): Circumvent bug#76239.
This commit is contained in:
parent
48f9d6aafe
commit
e34ea5db5f
1 changed files with 19 additions and 5 deletions
|
@ -181,13 +181,27 @@ pgtk_enumerate_devices (struct pgtk_display_info *dpyinfo,
|
||||||
{
|
{
|
||||||
rec = xmalloc (sizeof *rec);
|
rec = xmalloc (sizeof *rec);
|
||||||
rec->seat = g_object_ref (seat);
|
rec->seat = g_object_ref (seat);
|
||||||
rec->device = GDK_DEVICE (t1->data);
|
|
||||||
|
|
||||||
|
if (t1->data)
|
||||||
|
{
|
||||||
|
rec->device = GDK_DEVICE (t1->data);
|
||||||
snprintf (printbuf, 1026, "%u:%s",
|
snprintf (printbuf, 1026, "%u:%s",
|
||||||
gdk_device_get_source (rec->device),
|
gdk_device_get_source (rec->device),
|
||||||
gdk_device_get_name (rec->device));
|
gdk_device_get_name (rec->device));
|
||||||
|
|
||||||
rec->name = build_string (printbuf);
|
rec->name = build_string (printbuf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* GTK bug 7737 results in GDK seats being initialized
|
||||||
|
with NULL devices in some cirumstances. As events will
|
||||||
|
presumably also be delivered with their device fields
|
||||||
|
set to NULL, insert a ersatz device record associated
|
||||||
|
with NULL. (bug#76239) */
|
||||||
|
rec->device = NULL;
|
||||||
|
rec->name = build_string ("0:unknown device");
|
||||||
|
}
|
||||||
|
|
||||||
rec->next = dpyinfo->devices;
|
rec->next = dpyinfo->devices;
|
||||||
dpyinfo->devices = rec;
|
dpyinfo->devices = rec;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue