aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-10-22 09:00:12 -0400
committerGitHub <noreply@github.com>2017-10-22 09:00:12 -0400
commit799f8b95b72d8ea57386edf5e5e2deb59d06984c (patch)
tree1194b0c1327cf6427e2bd5a1c6129783d22bfbb3
parent018cd98620b1dbc1c4866bd8406a2841e5768792 (diff)
parent4952a633caba08d15e230090d09479db7b58da61 (diff)
Merge pull request #313 from emersion/remove-interface-version-checks
Remove interface version checks
-rw-r--r--types/wlr_compositor.c7
-rw-r--r--types/wlr_data_device_manager.c7
-rw-r--r--types/wlr_gamma_control.c6
-rw-r--r--types/wlr_output.c6
-rw-r--r--types/wlr_screenshooter.c7
-rw-r--r--types/wlr_seat.c7
-rw-r--r--types/wlr_wl_shell.c7
-rw-r--r--types/wlr_xdg_shell_v6.c7
8 files changed, 8 insertions, 46 deletions
diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c
index 12903cda..cbb7f138 100644
--- a/types/wlr_compositor.c
+++ b/types/wlr_compositor.c
@@ -53,12 +53,7 @@ static void wl_compositor_bind(struct wl_client *wl_client, void *_compositor,
uint32_t version, uint32_t id) {
struct wlr_compositor *compositor = _compositor;
assert(wl_client && compositor);
- if (version > 4) {
- wlr_log(L_ERROR, "Client requested unsupported wl_compositor version, "
- "disconnecting");
- wl_client_destroy(wl_client);
- return;
- }
+
struct wl_resource *wl_resource =
wl_resource_create(wl_client, &wl_compositor_interface, version, id);
wl_resource_set_implementation(wl_resource, &wl_compositor_impl,
diff --git a/types/wlr_data_device_manager.c b/types/wlr_data_device_manager.c
index a813754c..a390e5a2 100644
--- a/types/wlr_data_device_manager.c
+++ b/types/wlr_data_device_manager.c
@@ -133,12 +133,7 @@ static void data_device_manager_bind(struct wl_client *client, void *data,
uint32_t version, uint32_t id) {
struct wlr_data_device_manager *manager = data;
assert(client && manager);
- if (version > 3) {
- wlr_log(L_ERROR, "Client requested unsupported data_device_manager "
- "version, disconnecting");
- wl_client_destroy(client);
- return;
- }
+
struct wl_resource *resource = wl_resource_create(
client, &wl_data_device_manager_interface, version, id);
if (!resource) {
diff --git a/types/wlr_gamma_control.c b/types/wlr_gamma_control.c
index c654cc21..973fd613 100644
--- a/types/wlr_gamma_control.c
+++ b/types/wlr_gamma_control.c
@@ -69,11 +69,7 @@ static void gamma_control_manager_bind(struct wl_client *wl_client,
void *_gamma_control_manager, uint32_t version, uint32_t id) {
struct wlr_gamma_control_manager *gamma_control_manager = _gamma_control_manager;
assert(wl_client && gamma_control_manager);
- if (version > 1) {
- wlr_log(L_ERROR, "Client requested unsupported gamma_control version, disconnecting");
- wl_client_destroy(wl_client);
- return;
- }
+
struct wl_resource *wl_resource = wl_resource_create(
wl_client, &gamma_control_manager_interface, version, id);
wl_resource_set_implementation(wl_resource, &gamma_control_manager_impl,
diff --git a/types/wlr_output.c b/types/wlr_output.c
index 33324d5c..611d4ad1 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -75,11 +75,7 @@ static void wl_output_bind(struct wl_client *wl_client, void *_wlr_output,
uint32_t version, uint32_t id) {
struct wlr_output *wlr_output = _wlr_output;
assert(wl_client && wlr_output);
- if (version > 3) {
- wlr_log(L_ERROR, "Client requested unsupported wl_output version, disconnecting");
- wl_client_destroy(wl_client);
- return;
- }
+
struct wl_resource *wl_resource = wl_resource_create(
wl_client, &wl_output_interface, version, id);
wl_resource_set_implementation(wl_resource, &wl_output_impl,
diff --git a/types/wlr_screenshooter.c b/types/wlr_screenshooter.c
index 38204aa1..c6def691 100644
--- a/types/wlr_screenshooter.c
+++ b/types/wlr_screenshooter.c
@@ -121,12 +121,7 @@ static void screenshooter_bind(struct wl_client *wl_client,
void *_screenshooter, uint32_t version, uint32_t id) {
struct wlr_screenshooter *screenshooter = _screenshooter;
assert(wl_client && screenshooter);
- if (version > 1) {
- wlr_log(L_ERROR, "Client requested unsupported screenshooter version,"
- "disconnecting");
- wl_client_destroy(wl_client);
- return;
- }
+
struct wl_resource *wl_resource = wl_resource_create(wl_client,
&orbital_screenshooter_interface, version, id);
wl_resource_set_implementation(wl_resource, &screenshooter_impl,
diff --git a/types/wlr_seat.c b/types/wlr_seat.c
index 362c696a..e0fb3e8d 100644
--- a/types/wlr_seat.c
+++ b/types/wlr_seat.c
@@ -175,12 +175,7 @@ static void wl_seat_bind(struct wl_client *wl_client, void *_wlr_seat,
uint32_t version, uint32_t id) {
struct wlr_seat *wlr_seat = _wlr_seat;
assert(wl_client && wlr_seat);
- if (version > 6) {
- wlr_log(L_ERROR,
- "Client requested unsupported wl_seat version, disconnecting");
- wl_client_destroy(wl_client);
- return;
- }
+
struct wlr_seat_handle *handle = calloc(1, sizeof(struct wlr_seat_handle));
handle->wl_resource = wl_resource_create(
wl_client, &wl_seat_interface, version, id);
diff --git a/types/wlr_wl_shell.c b/types/wlr_wl_shell.c
index 022f865a..c269351c 100644
--- a/types/wlr_wl_shell.c
+++ b/types/wlr_wl_shell.c
@@ -580,12 +580,7 @@ static void shell_bind(struct wl_client *wl_client, void *_wl_shell,
uint32_t version, uint32_t id) {
struct wlr_wl_shell *wl_shell = _wl_shell;
assert(wl_client && wl_shell);
- if (version > 1) {
- wlr_log(L_ERROR,
- "Client requested unsupported wl_shell version, disconnecting");
- wl_client_destroy(wl_client);
- return;
- }
+
struct wl_resource *wl_resource = wl_resource_create(wl_client,
&wl_shell_interface, version, id);
wl_resource_set_implementation(wl_resource, &shell_impl, wl_shell,
diff --git a/types/wlr_xdg_shell_v6.c b/types/wlr_xdg_shell_v6.c
index efa6bb3a..91c38292 100644
--- a/types/wlr_xdg_shell_v6.c
+++ b/types/wlr_xdg_shell_v6.c
@@ -1201,12 +1201,7 @@ static void xdg_shell_bind(struct wl_client *wl_client, void *_xdg_shell,
uint32_t version, uint32_t id) {
struct wlr_xdg_shell_v6 *xdg_shell = _xdg_shell;
assert(wl_client && xdg_shell);
- if (version > 1) {
- wlr_log(L_ERROR,
- "Client requested unsupported xdg_shell_v6 version, disconnecting");
- wl_client_destroy(wl_client);
- return;
- }
+
struct wlr_xdg_client_v6 *client =
calloc(1, sizeof(struct wlr_xdg_client_v6));
if (client == NULL) {