Stop using MIN macros when choosing versions for wayland resources

Summary:
libwayland-server.so will post an error if the requested version
is higher than the supported one anyway, so there's no point in
doing this.

Using MIN() to pick versions is a client side idiom.

 #kansas

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3385
This commit is contained in:
Derek Foreman 2015-11-26 20:12:47 -05:00 committed by Mike Blumenkrantz
parent 9365129a5a
commit 81ff082e0d
3 changed files with 6 additions and 6 deletions

View File

@ -1574,7 +1574,7 @@ _e_comp_wl_compositor_cb_bind(struct wl_client *client, void *data EINA_UNUSED,
if (!(res =
wl_resource_create(client, &wl_compositor_interface,
MIN(version, COMPOSITOR_VERSION), id)))
version, id)))
{
ERR("Could not create compositor resource: %m");
wl_client_post_no_memory(client);
@ -2010,7 +2010,7 @@ _e_comp_wl_subcompositor_cb_bind(struct wl_client *client, void *data EINA_UNUSE
if (!(res =
wl_resource_create(client, &wl_subcompositor_interface,
MIN(version, 1), id)))
version, id)))
{
ERR("Could not create subcompositor resource: %m");
wl_client_post_no_memory(client);
@ -2426,7 +2426,7 @@ _e_comp_wl_cb_output_bind(struct wl_client *client, void *data, uint32_t version
if (!(output = data)) return;
resource =
wl_resource_create(client, &wl_output_interface, MIN(version, 2), id);
wl_resource_create(client, &wl_output_interface, version, id);
if (!resource)
{
wl_client_post_no_memory(client);

View File

@ -249,7 +249,7 @@ _e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data EINA_UNUSED,
{
struct wl_resource *res;
res = wl_resource_create(client, &wl_seat_interface, MIN(version, 4), id);
res = wl_resource_create(client, &wl_seat_interface, version, id);
if (!res)
{
ERR("Could not create seat resource: %m");

View File

@ -1323,7 +1323,7 @@ _e_shell_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t vers
{
struct wl_resource *res;
if (!(res = wl_resource_create(client, &wl_shell_interface, MIN(version, 1), id)))
if (!(res = wl_resource_create(client, &wl_shell_interface, version, id)))
{
wl_client_post_no_memory(client);
return;
@ -1340,7 +1340,7 @@ _e_xdg_shell_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t
{
struct wl_resource *res;
if (!(res = wl_resource_create(client, &xdg_shell_interface, MIN(version, 1), id)))
if (!(res = wl_resource_create(client, &xdg_shell_interface, version, id)))
{
wl_client_post_no_memory(client);
return;