compositor, input: Don't use MIN() macro for new resource versions
libwayland-server protects us from invalid serial numbers by posting an error already. MIN() is for clients when selecting interface versions. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
7eaed40b37
commit
1909c10825
|
@ -3883,7 +3883,7 @@ bind_output(struct wl_client *client,
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
|
|
||||||
resource = wl_resource_create(client, &wl_output_interface,
|
resource = wl_resource_create(client, &wl_output_interface,
|
||||||
MIN(version, 2), id);
|
version, id);
|
||||||
if (resource == NULL) {
|
if (resource == NULL) {
|
||||||
wl_client_post_no_memory(client);
|
wl_client_post_no_memory(client);
|
||||||
return;
|
return;
|
||||||
|
@ -4369,7 +4369,7 @@ bind_scaler(struct wl_client *client,
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
|
|
||||||
resource = wl_resource_create(client, &wl_scaler_interface,
|
resource = wl_resource_create(client, &wl_scaler_interface,
|
||||||
MIN(version, 2), id);
|
version, id);
|
||||||
if (resource == NULL) {
|
if (resource == NULL) {
|
||||||
wl_client_post_no_memory(client);
|
wl_client_post_no_memory(client);
|
||||||
return;
|
return;
|
||||||
|
@ -4444,7 +4444,7 @@ bind_presentation(struct wl_client *client,
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
|
|
||||||
resource = wl_resource_create(client, &presentation_interface,
|
resource = wl_resource_create(client, &presentation_interface,
|
||||||
MIN(version, 1), id);
|
version, id);
|
||||||
if (resource == NULL) {
|
if (resource == NULL) {
|
||||||
wl_client_post_no_memory(client);
|
wl_client_post_no_memory(client);
|
||||||
return;
|
return;
|
||||||
|
@ -4463,7 +4463,7 @@ compositor_bind(struct wl_client *client,
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
|
|
||||||
resource = wl_resource_create(client, &wl_compositor_interface,
|
resource = wl_resource_create(client, &wl_compositor_interface,
|
||||||
MIN(version, 3), id);
|
version, id);
|
||||||
if (resource == NULL) {
|
if (resource == NULL) {
|
||||||
wl_client_post_no_memory(client);
|
wl_client_post_no_memory(client);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2142,7 +2142,7 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
|
||||||
enum wl_seat_capability caps = 0;
|
enum wl_seat_capability caps = 0;
|
||||||
|
|
||||||
resource = wl_resource_create(client,
|
resource = wl_resource_create(client,
|
||||||
&wl_seat_interface, MIN(version, 4), id);
|
&wl_seat_interface, version, id);
|
||||||
wl_list_insert(&seat->base_resource_list, wl_resource_get_link(resource));
|
wl_list_insert(&seat->base_resource_list, wl_resource_get_link(resource));
|
||||||
wl_resource_set_implementation(resource, &seat_interface, data,
|
wl_resource_set_implementation(resource, &seat_interface, data,
|
||||||
unbind_resource);
|
unbind_resource);
|
||||||
|
|
Loading…
Reference in New Issue