static int
load_modules(struct weston_compositor *ec, const char *modules,
- int *argc, char *argv[])
+ int *argc, char *argv[], int32_t *xwayland)
{
const char *p, *end;
char buffer[256];
snprintf(buffer, sizeof buffer, "%.*s", (int) (end - p), p);
if (strstr(buffer, "xwayland.so")) {
- if (wet_load_xwayland(ec) < 0)
- return -1;
+ weston_log("Old Xwayland module loading detected:"
+ "Please use --xwayland command line option"
+ "or weston.ini xwayland=true\n");
+ *xwayland = 1;
} else {
if (wet_load_module(ec, buffer, argc, argv) < 0)
return -1;
int i, fd;
char *backend = NULL;
char *shell = NULL;
+ int32_t xwayland = 0;
char *modules = NULL;
char *option_modules = NULL;
char *log = NULL;
{ WESTON_OPTION_STRING, "shell", 0, &shell },
{ WESTON_OPTION_STRING, "socket", 'S', &socket_name },
{ WESTON_OPTION_INTEGER, "idle-time", 'i', &idle_time },
+ { WESTON_OPTION_BOOLEAN, "xwayland", 0, &xwayland },
{ WESTON_OPTION_STRING, "modules", 0, &option_modules },
{ WESTON_OPTION_STRING, "log", 0, &log },
{ WESTON_OPTION_BOOLEAN, "help", 'h', &help },
goto out;
weston_config_section_get_string(section, "modules", &modules, "");
- if (load_modules(ec, modules, &argc, argv) < 0)
+ if (load_modules(ec, modules, &argc, argv, &xwayland) < 0)
goto out;
- if (load_modules(ec, option_modules, &argc, argv) < 0)
+ if (load_modules(ec, option_modules, &argc, argv, &xwayland) < 0)
goto out;
+ if (!xwayland)
+ weston_config_section_get_bool(section, "xwayland", &xwayland,
+ false);
+ if (xwayland) {
+ if (wet_load_xwayland(ec) < 0)
+ goto out;
+ }
+
section = weston_config_get_section(config, "keyboard", NULL, NULL);
weston_config_section_get_bool(section, "numlock-on", &numlock_on, 0);
if (numlock_on) {
Wayland stack.
XWayland is activated by instructing
-.BR weston " to load " xwayland.so " module, see " EXAMPLES .
+.BR weston " to load the XWayland module, see " EXAMPLES .
Weston starts listening on a new X display socket, and exports it in the
environment variable
.BR DISPLAY .
.I file.log
instead of writing them to stderr.
.TP
+\fB\-\-xwayland\fR
+Ask Weston to load the XWayland module.
+.TP
\fB\-\-modules\fR=\fImodule1.so,module2.so\fR
Load the comma-separated list of modules. Only used by the test
suite. The file is searched for in
.IP "Launch Weston with the DRM backend on a VT"
weston-launch
.IP "Launch Weston with the DRM backend and XWayland support"
-weston-launch -- --modules=xwayland.so
+weston-launch -- --xwayland
.IP "Launch Weston (wayland-1) nested in another Weston instance (wayland-0)"
WAYLAND_DISPLAY=wayland-0 weston -Swayland-1
.IP "From an X terminal, launch Weston with the x11 backend"
SHELL_PLUGIN=$MODDIR/desktop-shell.so
TEST_PLUGIN=$MODDIR/weston-test.so
-XWAYLAND_PLUGIN=$MODDIR/xwayland.so
CONFIG_FILE="${TEST_NAME}.ini"
${CONFIG} \
--shell=$SHELL_PLUGIN \
--socket=test-${TEST_NAME} \
- --modules=$MODDIR/${TEST_FILE/.la/.so},$XWAYLAND_PLUGIN \
+ --xwayland \
+ --modules=$MODDIR/${TEST_FILE/.la/.so} \
--log="$SERVERLOG" \
&> "$OUTLOG"
;;
${CONFIG} \
--shell=$SHELL_PLUGIN \
--socket=test-${TEST_NAME} \
- --modules=$TEST_PLUGIN,$XWAYLAND_PLUGIN \
+ --xwayland \
+ --modules=$TEST_PLUGIN \
--log="$SERVERLOG" \
$($abs_builddir/$TEST_FILE --params) \
&> "$OUTLOG"