| Index: components/exo/wayland/server.cc
|
| diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
|
| index 557142ee26bf046a9cf704965f18bc9e6c7cf6a3..60766e64dd2babfde63af03014d55809b8bccf28 100644
|
| --- a/components/exo/wayland/server.cc
|
| +++ b/components/exo/wayland/server.cc
|
| @@ -2957,6 +2957,12 @@ void stylus_get_pointer_stylus(wl_client* client,
|
| uint32_t id,
|
| wl_resource* pointer_resource) {
|
| Pointer* pointer = GetUserDataAs<Pointer>(pointer_resource);
|
| + if (pointer->HasStylusDelegate()) {
|
| + wl_resource_post_error(
|
| + resource, ZCR_STYLUS_V1_ERROR_POINTER_STYLUS_EXISTS,
|
| + "pointer has already been associated with a stylus object");
|
| + return;
|
| + }
|
|
|
| wl_resource* stylus_resource =
|
| wl_resource_create(client, &zcr_pointer_stylus_v1_interface, 1, id);
|
| @@ -3016,7 +3022,7 @@ Server::Server(Display* display)
|
| remote_shell_version, display_, bind_remote_shell);
|
| wl_global_create(wl_display_.get(), &zcr_gaming_input_v1_interface, 1,
|
| display_, bind_gaming_input);
|
| - wl_global_create(wl_display_.get(), &zcr_stylus_v1_interface, 1, display_,
|
| + wl_global_create(wl_display_.get(), &zcr_stylus_v1_interface, 2, display_,
|
| bind_stylus);
|
| }
|
|
|
|
|