libweston-desktop: introduce a deprecated-wl-shell option

This is the first step towards removing wl_shell support.

Add an option so that users can toggle support for the deprecated
wl_shell protocol. This lets users test their clients to make sure
they work fine without wl_shell.

The option is set to false by default.

Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Simon Ser
2021-02-16 13:34:46 +01:00
committed by Daniel Stone
parent 80e9482292
commit 413d210422
3 changed files with 20 additions and 0 deletions
+9
View File
@@ -77,12 +77,21 @@ weston_desktop_create(struct weston_compositor *compositor,
return NULL;
}
#ifdef HAVE_DEPRECATED_WL_SHELL
weston_log("Warning: support for deprecated wl_shell interface is "
"enabled. Please migrate legacy clients to xdg-shell.\n");
desktop->wl_shell =
weston_desktop_wl_shell_create(desktop, display);
if (desktop->wl_shell == NULL) {
weston_desktop_destroy(desktop);
return NULL;
}
#else
weston_log("Note: support for the deprecated wl_shell interface is "
"disabled. If a legacy client still needs it, it can be "
"re-enabled by passing -Ddeprecated-wl-shell=true to Meson "
"when building Weston.\n");
#endif
weston_desktop_xwayland_init(desktop);