devilhorns pushed a commit to branch master.
commit 2b6a8ecf247c8841f61eb07ffa14c197b0ec46a2
Author: Chris Michael <[email protected]>
Date: Mon Jul 15 13:40:32 2013 +0100
Update wayland-client support for recent Wayland api changes (replace
wl_display_add_global with wl_global_create, and fix wl_client calls
to create resources with wl_resource).
NB: This brings client support up to par with version 1.2 of Wayland
Signed-off-by: Chris Michael <[email protected]>
---
src/bin/e_comp_wl.c | 13 ++++++-------
src/modules/wl_desktop_shell/e_mod_main.c | 11 +++++------
2 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 52a0c3f..12b4d1c 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -232,8 +232,8 @@ e_comp_wl_init(void)
wl_signal_init(&_e_wl_comp->signals.seat);
/* try to add compositor to the displays globals */
- if (!wl_display_add_global(_e_wl_comp->wl.display, &wl_compositor_interface,
- _e_wl_comp, _e_comp_wl_cb_bind))
+ if (!wl_global_create(_e_wl_comp->wl.display, &wl_compositor_interface, 3,
+ _e_wl_comp, _e_comp_wl_cb_bind))
{
ERR("Could not add compositor to globals: %m");
goto err;
@@ -745,9 +745,8 @@ wl_data_device_set_keyboard_focus(struct wl_seat *seat)
EAPI int
wl_data_device_manager_init(struct wl_display *display)
{
- if (wl_display_add_global(display,
- &wl_data_device_manager_interface,
- NULL, _bind_manager) == NULL)
+ if (!wl_global_create(display, &wl_data_device_manager_interface, 1,
+ NULL, _bind_manager))
return -1;
return 0;
}
@@ -1730,8 +1729,8 @@ _e_comp_wl_input_init(void)
wl_seat_init(&_e_wl_comp->input->wl.seat);
/* try to add this input to the diplay's list of globals */
- if (!wl_display_add_global(_e_wl_comp->wl.display, &wl_seat_interface,
- _e_wl_comp->input, _e_comp_wl_input_cb_bind))
+ if (!wl_global_create(_e_wl_comp->wl.display, &wl_seat_interface, 2,
+ _e_wl_comp->input, _e_comp_wl_input_cb_bind))
{
ERR("Could not add Input to Wayland Display Globals: %m");
goto err;
diff --git a/src/modules/wl_desktop_shell/e_mod_main.c
b/src/modules/wl_desktop_shell/e_mod_main.c
index de72dc8..9276b4f 100644
--- a/src/modules/wl_desktop_shell/e_mod_main.c
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -182,14 +182,13 @@ e_modapi_init(E_Module *m)
_e_wl_shell_shell_surface_create;
/* try to add this shell to the display's global list */
- if (!(gshell =
- wl_display_add_global(_e_wl_comp->wl.display, &wl_shell_interface,
- shell, _e_wl_shell_cb_bind)))
+ if (!(gshell = wl_global_create(_e_wl_comp->wl.display,
&wl_shell_interface,
+ 1, shell, _e_wl_shell_cb_bind)))
goto err;
/* try to add the desktop shell interface to the display's global list */
- if (!wl_display_add_global(_e_wl_comp->wl.display,
- &e_desktop_shell_interface, shell, NULL))
+ if (!wl_global_create(_e_wl_comp->wl.display, &e_desktop_shell_interface,
+ 2, shell, NULL))
goto err;
/* for each input, we need to create a pointer focus listener */
@@ -214,7 +213,7 @@ e_modapi_init(E_Module *m)
err:
/* remove previously added shell global */
- if (gshell) wl_display_remove_global(_e_wl_comp->wl.display, gshell);
+ if (gshell) wl_global_destroy(gshell);
/* reset compositor shell interface */
_e_wl_comp->shell_interface.shell = NULL;
--
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk