ecore-wayland: make possible to disable xdg-shell at runtime

Summary:
Since xdg-shell is not yet supported officialy by wayland
It makes sense to have it disabled by default
and enable it on purpose.

Using env variable : EFL_WAYLAND_DONT_USE_XDG_SHELL
(name is inspired from Qt implementation of xdg-shell
but in the opposite way)

There is no EFL_WAYLAND_USE_XDG_SHELL in efl,
please use EFL_WAYLAND_DONT_USE_XDG_SHELL instead.

By default xdg-shell is enabled since it's supported by efl

Since there is only one shell supported at runtime
it's easier to switch to wl-shell (wayland's fallback shell)
by change this env variable.

Note, this patch can be reverted once xdg-shell replaces wl-shell
in wayland which is not the case in weston-1.6
but could integrated into upcoming wayland-1.7
(to be confirmed on release)

Change-Id: Id3732492397df9abe4a7c9e6e92a8f2c993c8395
Bug: https://phab.enlightenment.org/T1901
Bug-Tizen: TC-1353/part
Forwarded: https://phab.enlightenment.org/T1901
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>

Tizen Test Plan: echo 'export EFL_WAYLAND_DONT_USE_XDG_SHELL=defined' > /etc/profile.d/ecore.sh

Reviewers: seoz, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1734
This commit is contained in:
Philippe Coval 2014-12-05 14:02:16 -05:00 committed by Chris Michael
parent 3da1ac3b42
commit 17dbfd3ec7
1 changed files with 1 additions and 1 deletions

View File

@ -643,7 +643,7 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in
wl_registry_bind(registry, id, &ivi_application_interface, 1);
}
#endif
else if (!strcmp(interface, "xdg_shell"))
else if (!strcmp(interface, "xdg_shell") && !getenv("EFL_WAYLAND_DONT_USE_XDG_SHELL"))
{
ewd->wl.xdg_shell =
wl_registry_bind(registry, id, &xdg_shell_interface, 1);