/* Find suitable touch screen devices, and select touch events for each */
for (i = 0; i < ndevices; i++) {
XIEventMask mask_data;
- GstXvTouchDevice temp, *device;
+ GstXvTouchDevice temp;
gboolean has_touch = FALSE;
if (devices[i].use != XISlavePointer)
"pressure-sensitive (abs)" : "pressure-sensitive (rel)"),
temp.id, temp.name);
- device = g_new (GstXvTouchDevice, 1);
- *device = temp;
- device->name = g_strdup (device->name);
+ GstXvTouchDevice device = temp;
+ device.name = g_strdup (temp.name);
+
window->touch_devices =
- g_array_append_vals (window->touch_devices, device, 1);
+ g_array_append_val (window->touch_devices, device);
mask_data.deviceid = temp.id;
mask_data.mask_len = mask_len;