summaryrefslogtreecommitdiff
path: root/src/evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evdev.c')
-rw-r--r--src/evdev.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 052e9f0..94f5499 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2548,6 +2548,9 @@ EvdevUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
/* Release string allocated in EvdevOpenDevice. */
free(pEvdev->device);
pEvdev->device = NULL;
+
+ free(pEvdev->type_name);
+ pEvdev->type_name = NULL;
}
xf86DeleteInput(pInfo, flags);
}
@@ -2579,6 +2582,8 @@ EvdevAlloc(void)
pEvdev->rel_axis_map[0] = 0;
pEvdev->rel_axis_map[1] = 1;
+ pEvdev->type_name = NULL;
+
return pEvdev;
}
@@ -2623,6 +2628,14 @@ EvdevPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
goto error;
}
+ /* Overwrite type_name with custom-defined one (#62831).
+ Note: pInfo->type_name isn't freed so we need to manually do this
+ */
+ pEvdev->type_name = xf86SetStrOption(pInfo->options,
+ "TypeName",
+ pInfo->type_name);
+ pInfo->type_name = pEvdev->type_name;
+
EvdevAddDevice(pInfo);
if (pEvdev->flags & EVDEV_BUTTON_EVENTS)