mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
clutter: Don't keep extra copy on device events
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403
This commit is contained in:
parent
06adde5c6b
commit
6c265c131f
@ -1165,7 +1165,7 @@ clutter_event_set_device (ClutterEvent *event,
|
||||
|
||||
case CLUTTER_DEVICE_ADDED:
|
||||
case CLUTTER_DEVICE_REMOVED:
|
||||
g_set_object (&event->device.device, device);
|
||||
event->device.device = device;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1423,9 +1423,6 @@ clutter_event_copy (const ClutterEvent *event)
|
||||
|
||||
case CLUTTER_DEVICE_ADDED:
|
||||
case CLUTTER_DEVICE_REMOVED:
|
||||
g_set_object (&new_event->device.device, event->device.device);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1482,7 +1479,6 @@ clutter_event_free (ClutterEvent *event)
|
||||
break;
|
||||
case CLUTTER_DEVICE_ADDED:
|
||||
case CLUTTER_DEVICE_REMOVED:
|
||||
g_clear_object (&event->device.device);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1448,7 +1448,7 @@ evdev_add_device (MetaSeatImpl *seat,
|
||||
|
||||
device = meta_input_device_native_new (seat, libinput_device);
|
||||
|
||||
seat->devices = g_slist_prepend (seat->devices, device);
|
||||
seat->devices = g_slist_prepend (seat->devices, g_object_ref (device));
|
||||
|
||||
/* Clutter assumes that device types are exclusive in the
|
||||
* ClutterInputDevice API */
|
||||
|
@ -170,14 +170,6 @@ meta_seat_native_finalize (GObject *object)
|
||||
g_clear_object (&seat->core_keyboard);
|
||||
g_clear_object (&seat->impl);
|
||||
|
||||
for (iter = seat->devices; iter; iter = g_slist_next (iter))
|
||||
{
|
||||
ClutterInputDevice *device = iter->data;
|
||||
|
||||
g_object_unref (device);
|
||||
}
|
||||
g_slist_free (seat->devices);
|
||||
|
||||
g_clear_pointer (&seat->tablet_cursors, g_hash_table_unref);
|
||||
g_object_unref (seat->cursor_renderer);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user