commit 284cf40
Michael Forney
·
2013-09-13 00:22:51 +0000 UTC
parent 1e55671
seat: Support v2
1 files changed,
+6,
-3
+6,
-3
1@@ -258,14 +258,17 @@ static void bind_seat(struct wl_client * client, void * data, uint32_t version,
2 struct swc_seat * seat = data;
3 struct wl_resource * resource;
4
5- if (version >= 1)
6- version = 1;
7+ if (version >= 2)
8+ version = 2;
9
10 resource = wl_resource_create(client, &wl_seat_interface, version, id);
11 wl_resource_set_implementation(resource, &seat_implementation, seat,
12 &swc_remove_resource);
13 wl_list_insert(&seat->resources, wl_resource_get_link(resource));
14
15+ if (version >= 2)
16+ wl_seat_send_name(resource, seat->name);
17+
18 wl_seat_send_capabilities(resource, seat->capabilities);
19 }
20
21@@ -399,7 +402,7 @@ void swc_seat_finish(struct swc_seat * seat)
22
23 void swc_seat_add_globals(struct swc_seat * seat, struct wl_display * display)
24 {
25- wl_global_create(display, &wl_seat_interface, 1, seat, &bind_seat);
26+ wl_global_create(display, &wl_seat_interface, 2, seat, &bind_seat);
27 }
28
29 void swc_seat_add_event_sources(struct swc_seat * seat,