diff options
-rw-r--r-- | src/wayland-server.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wayland-server.c b/src/wayland-server.c index e04d2f4..80e76e1 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -701,11 +701,15 @@ registry_bind(struct wl_client *client, if (global->name == name) break; - if (&global->link == &display->global_list || - global->version < version) + if (&global->link == &display->global_list) wl_resource_post_error(resource, WL_DISPLAY_ERROR_INVALID_OBJECT, - "invalid global %d", name); + "invalid global %s (%d)", interface, name); + else if (global->version < version) + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, + "invalid version for global %s (%d): have %d, wanted %d", + interface, name, global->version, version); else global->bind(client, global->data, version, id); } |