swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit b91efe6ddb16f997e9b7ddc8d9a32c0668af92b6
parent ae759b3bfb7561aaa4ed407f293343534825452f
Author: Michael Forney <mforney@mforney.org>
Date:   Sun, 29 Dec 2019 22:11:59 -0800

Remove unnecessary version checks in global bind functions

libwayland-server already does these checks for us.

Diffstat:
Mlibswc/compositor.c | 3---
Mlibswc/data_device_manager.c | 3---
Mlibswc/dmabuf.c | 2--
Mlibswc/drm.c | 3---
Mlibswc/output.c | 3---
Mlibswc/panel_manager.c | 3---
Mlibswc/screen.c | 3---
Mlibswc/seat.c | 3---
Mlibswc/shell.c | 3---
Mlibswc/shm.c | 3---
Mlibswc/subcompositor.c | 3---
Mlibswc/xdg_shell.c | 3---
12 files changed, 0 insertions(+), 35 deletions(-)

diff --git a/libswc/compositor.c b/libswc/compositor.c @@ -776,9 +776,6 @@ bind_compositor(struct wl_client *client, void *data, uint32_t version, uint32_t { struct wl_resource *resource; - if (version > 4) - version = 4; - resource = wl_resource_create(client, &wl_compositor_interface, version, id); wl_resource_set_implementation(resource, &compositor_impl, NULL, NULL); } diff --git a/libswc/data_device_manager.c b/libswc/data_device_manager.c @@ -56,9 +56,6 @@ bind_data_device_manager(struct wl_client *client, void *data, uint32_t version, { struct wl_resource *resource; - if (version > 1) - version = 1; - resource = wl_resource_create(client, &wl_data_device_manager_interface, version, id); wl_resource_set_implementation(resource, &data_device_manager_impl, NULL, NULL); } diff --git a/libswc/dmabuf.c b/libswc/dmabuf.c @@ -183,8 +183,6 @@ bind_dmabuf(struct wl_client *client, void *data, uint32_t version, uint32_t id) struct wl_resource *resource; size_t i; - if (version > 3) - version = 3; resource = wl_resource_create(client, &zwp_linux_dmabuf_v1_interface, version, id); if (!resource) { wl_client_post_no_memory(client); diff --git a/libswc/drm.c b/libswc/drm.c @@ -239,9 +239,6 @@ bind_drm(struct wl_client *client, void *data, uint32_t version, uint32_t id) { struct wl_resource *resource; - if (version > 2) - version = 2; - resource = wl_resource_create(client, &wl_drm_interface, version, id); wl_resource_set_implementation(resource, &drm_impl, NULL, NULL); diff --git a/libswc/output.c b/libswc/output.c @@ -20,9 +20,6 @@ bind_output(struct wl_client *client, void *data, uint32_t version, uint32_t id) struct wl_resource *resource; uint32_t flags; - if (version > 2) - version = 2; - resource = wl_resource_create(client, &wl_output_interface, version, id); if (!resource) { diff --git a/libswc/panel_manager.c b/libswc/panel_manager.c @@ -46,9 +46,6 @@ bind_panel_manager(struct wl_client *client, void *data, uint32_t version, uint3 { struct wl_resource *resource; - if (version > 1) - version = 1; - resource = wl_resource_create(client, &swc_panel_manager_interface, version, id); wl_resource_set_implementation(resource, &panel_manager_impl, NULL, NULL); } diff --git a/libswc/screen.c b/libswc/screen.c @@ -84,9 +84,6 @@ bind_screen(struct wl_client *client, void *data, uint32_t version, uint32_t id) struct screen *screen = data; struct wl_resource *resource; - if (version > 1) - version = 1; - resource = wl_resource_create(client, &swc_screen_interface, version, id); if (!resource) { diff --git a/libswc/seat.c b/libswc/seat.c @@ -153,9 +153,6 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id) struct seat *seat = data; struct wl_resource *resource; - if (version > 4) - version = 4; - resource = wl_resource_create(client, &wl_seat_interface, version, id); wl_resource_set_implementation(resource, &seat_impl, seat, &remove_resource); wl_list_insert(&seat->resources, wl_resource_get_link(resource)); diff --git a/libswc/shell.c b/libswc/shell.c @@ -48,9 +48,6 @@ bind_shell(struct wl_client *client, void *data, uint32_t version, uint32_t id) { struct wl_resource *resource; - if (version > 1) - version = 1; - resource = wl_resource_create(client, &wl_shell_interface, version, id); wl_resource_set_implementation(resource, &shell_implementation, NULL, NULL); } diff --git a/libswc/shm.c b/libswc/shm.c @@ -199,9 +199,6 @@ bind_shm(struct wl_client *client, void *data, uint32_t version, uint32_t id) struct swc_shm *shm = data; struct wl_resource *resource; - if (version > 1) - version = 1; - resource = wl_resource_create(client, &wl_shm_interface, version, id); wl_resource_set_implementation(resource, &shm_impl, shm, NULL); diff --git a/libswc/subcompositor.c b/libswc/subcompositor.c @@ -53,9 +53,6 @@ bind_subcompositor(struct wl_client *client, void *data, uint32_t version, uint3 { struct wl_resource *resource; - if (version > 1) - version = 1; - resource = wl_resource_create(client, &wl_subcompositor_interface, version, id); wl_resource_set_implementation(resource, &subcompositor_impl, NULL, NULL); } diff --git a/libswc/xdg_shell.c b/libswc/xdg_shell.c @@ -506,9 +506,6 @@ bind_wm_base(struct wl_client *client, void *data, uint32_t version, uint32_t id { struct wl_resource *resource; - if (version > 1) - version = 1; - resource = wl_resource_create(client, &xdg_wm_base_interface, version, id); if (!resource) { wl_client_post_no_memory(client);