diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2016-09-12 23:20:36 +0800 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2016-09-15 09:55:34 +0800 |
commit | 87f82d9fc09245788a6d82303c67e600ff398f9a (patch) | |
tree | cad9a11e8a09c3ebfb0f53d13f712ead031220ca /src/wayland/meta-wayland-seat.c | |
parent | a6646b32d0b078948bbb47e84037f09b5b6ff990 (diff) | |
download | mutter-87f82d9fc09245788a6d82303c67e600ff398f9a.tar.gz |
wayland: Move device seat association to MetaWaylandInputDevice
Make the device <-> seat association permanent, and move it into
MetaWaylandInputDevice. A device will never be disassociated with a
seat, so there is no point in unsetting it.
https://bugzilla.gnome.org/show_bug.cgi?id=771305
Diffstat (limited to 'src/wayland/meta-wayland-seat.c')
-rw-r--r-- | src/wayland/meta-wayland-seat.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c index ec1c0bb60..7fd815b12 100644 --- a/src/wayland/meta-wayland-seat.c +++ b/src/wayland/meta-wayland-seat.c @@ -157,7 +157,7 @@ meta_wayland_seat_set_capabilities (MetaWaylandSeat *seat, seat->capabilities = flags; if (CAPABILITY_ENABLED (prev_flags, flags, WL_SEAT_CAPABILITY_POINTER)) - meta_wayland_pointer_enable (seat->pointer, seat); + meta_wayland_pointer_enable (seat->pointer); else if (CAPABILITY_DISABLED (prev_flags, flags, WL_SEAT_CAPABILITY_POINTER)) meta_wayland_pointer_disable (seat->pointer); @@ -165,7 +165,7 @@ meta_wayland_seat_set_capabilities (MetaWaylandSeat *seat, { MetaDisplay *display; - meta_wayland_keyboard_enable (seat->keyboard, seat); + meta_wayland_keyboard_enable (seat->keyboard); display = meta_get_display (); /* Post-initialization, ensure the input focus is in sync */ @@ -176,7 +176,7 @@ meta_wayland_seat_set_capabilities (MetaWaylandSeat *seat, meta_wayland_keyboard_disable (seat->keyboard); if (CAPABILITY_ENABLED (prev_flags, flags, WL_SEAT_CAPABILITY_TOUCH)) - meta_wayland_touch_enable (seat->touch, seat); + meta_wayland_touch_enable (seat->touch); else if (CAPABILITY_DISABLED (prev_flags, flags, WL_SEAT_CAPABILITY_TOUCH)) meta_wayland_touch_disable (seat->touch); @@ -215,9 +215,15 @@ meta_wayland_seat_new (MetaWaylandCompositor *compositor, wl_list_init (&seat->base_resource_list); seat->wl_display = display; - seat->pointer = g_object_new (META_TYPE_WAYLAND_POINTER, NULL); - seat->keyboard = g_object_new (META_TYPE_WAYLAND_KEYBOARD, NULL); - seat->touch = g_object_new (META_TYPE_WAYLAND_TOUCH, NULL); + seat->pointer = g_object_new (META_TYPE_WAYLAND_POINTER, + "seat", seat, + NULL); + seat->keyboard = g_object_new (META_TYPE_WAYLAND_KEYBOARD, + "seat", seat, + NULL); + seat->touch = g_object_new (META_TYPE_WAYLAND_TOUCH, + "seat", seat, + NULL); meta_wayland_data_device_init (&seat->data_device); |