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:
@@ -77,12 +77,21 @@ weston_desktop_create(struct weston_compositor *compositor,
|
|||||||
return NULL;
|
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 =
|
desktop->wl_shell =
|
||||||
weston_desktop_wl_shell_create(desktop, display);
|
weston_desktop_wl_shell_create(desktop, display);
|
||||||
if (desktop->wl_shell == NULL) {
|
if (desktop->wl_shell == NULL) {
|
||||||
weston_desktop_destroy(desktop);
|
weston_desktop_destroy(desktop);
|
||||||
return NULL;
|
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);
|
weston_desktop_xwayland_init(desktop);
|
||||||
|
|
||||||
|
|||||||
@@ -139,6 +139,10 @@ if dep_xkbcommon.version().version_compare('>= 0.5.0')
|
|||||||
config_h.set('HAVE_XKBCOMMON_COMPOSE', '1')
|
config_h.set('HAVE_XKBCOMMON_COMPOSE', '1')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if get_option('deprecated-wl-shell')
|
||||||
|
config_h.set('HAVE_DEPRECATED_WL_SHELL', '1')
|
||||||
|
endif
|
||||||
|
|
||||||
dep_wayland_server = dependency('wayland-server', version: '>= 1.18.0')
|
dep_wayland_server = dependency('wayland-server', version: '>= 1.18.0')
|
||||||
dep_wayland_client = dependency('wayland-client', version: '>= 1.18.0')
|
dep_wayland_client = dependency('wayland-client', version: '>= 1.18.0')
|
||||||
dep_pixman = dependency('pixman-1', version: '>= 0.25.2')
|
dep_pixman = dependency('pixman-1', version: '>= 0.25.2')
|
||||||
|
|||||||
@@ -138,6 +138,13 @@ option(
|
|||||||
description: 'Weston desktop shell: default helper client selection'
|
description: 'Weston desktop shell: default helper client selection'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
option(
|
||||||
|
'deprecated-wl-shell',
|
||||||
|
type: 'boolean',
|
||||||
|
value: false,
|
||||||
|
description: 'Enable the deprecated wl_shell protocol'
|
||||||
|
)
|
||||||
|
|
||||||
option(
|
option(
|
||||||
'color-management-lcms',
|
'color-management-lcms',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
|
|||||||
Reference in New Issue
Block a user