summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-07-16 12:18:25 +0100
committerChris Michael <cp.michael@samsung.com>2013-07-16 12:18:25 +0100
commit98ddf4d05c649ac78d4b1d1f34b4f52e7b4fe617 (patch)
tree30d8bbaf5e7204555e7d26cd64357f6ea58a5e0a
parent1d8b816819d7ca691cd14a7a991c65c5f01f4b45 (diff)
downloadenlightenment-98ddf4d05c649ac78d4b1d1f34b4f52e7b4fe617.tar.gz
Update desktop shell for recent Wayland 1.2 changes (wl_global,
wl_resource, etc). Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/wl_desktop/e_mod_main.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/modules/wl_desktop/e_mod_main.c b/src/modules/wl_desktop/e_mod_main.c
index f8a2d4ec70..e1eb4444c4 100644
--- a/src/modules/wl_desktop/e_mod_main.c
+++ b/src/modules/wl_desktop/e_mod_main.c
@@ -97,8 +97,8 @@ e_modapi_init(E_Module *m)
/* try to add this shell to the globals */
if (!(global =
- wl_display_add_global(_e_comp->wl.display, &wl_shell_interface,
- shell, _e_desktop_shell_cb_bind)))
+ wl_global_create(_e_comp->wl.display, &wl_shell_interface, 1,
+ shell, _e_desktop_shell_cb_bind)))
{
ERR("Could not add shell to globals: %m");
goto err;
@@ -153,13 +153,15 @@ static void
_e_desktop_shell_cb_bind(struct wl_client *client, void *data, unsigned int version EINA_UNUSED, unsigned int id)
{
E_Desktop_Shell *shell;
+ struct wl_resource *res;
/* try to cast data to our shell */
if (!(shell = data)) return;
- /* try to add the shell to the client */
- wl_client_add_object(client, &wl_shell_interface,
- &_e_desktop_shell_interface, id, shell);
+ res = wl_resource_create(client, &wl_shell_interface, 1, id);
+ if (res)
+ wl_resource_set_implementation(res, &_e_desktop_shell_interface,
+ shell, NULL);
}
static void
@@ -200,11 +202,10 @@ _e_desktop_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resour
/* setup shell surface interface */
ess->wl.resource =
- wl_client_add_object(client, &wl_shell_surface_interface,
- &_e_desktop_shell_surface_interface, id, ess);
-
- wl_resource_set_destructor(ess->wl.resource,
- _e_desktop_shell_shell_surface_cb_destroy);
+ wl_resource_create(client, &wl_shell_surface_interface, 1, id);
+ wl_resource_set_implementation(ess->wl.resource,
+ &_e_desktop_shell_surface_interface,
+ ess, _e_desktop_shell_shell_surface_cb_destroy);
}
static void