|
|
@ -845,7 +845,7 @@ wet_load_shell(struct weston_compositor *compositor, |
|
|
|
|
|
|
|
|
|
|
|
static int |
|
|
|
static int |
|
|
|
load_modules(struct weston_compositor *ec, const char *modules, |
|
|
|
load_modules(struct weston_compositor *ec, const char *modules, |
|
|
|
int *argc, char *argv[]) |
|
|
|
int *argc, char *argv[], int32_t *xwayland) |
|
|
|
{ |
|
|
|
{ |
|
|
|
const char *p, *end; |
|
|
|
const char *p, *end; |
|
|
|
char buffer[256]; |
|
|
|
char buffer[256]; |
|
|
@ -859,8 +859,10 @@ load_modules(struct weston_compositor *ec, const char *modules, |
|
|
|
snprintf(buffer, sizeof buffer, "%.*s", (int) (end - p), p); |
|
|
|
snprintf(buffer, sizeof buffer, "%.*s", (int) (end - p), p); |
|
|
|
|
|
|
|
|
|
|
|
if (strstr(buffer, "xwayland.so")) { |
|
|
|
if (strstr(buffer, "xwayland.so")) { |
|
|
|
if (wet_load_xwayland(ec) < 0) |
|
|
|
weston_log("Old Xwayland module loading detected:" |
|
|
|
return -1; |
|
|
|
"Please use --xwayland command line option" |
|
|
|
|
|
|
|
"or weston.ini xwayland=true\n"); |
|
|
|
|
|
|
|
*xwayland = 1; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (wet_load_module(ec, buffer, argc, argv) < 0) |
|
|
|
if (wet_load_module(ec, buffer, argc, argv) < 0) |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
@ -1756,6 +1758,7 @@ int main(int argc, char *argv[]) |
|
|
|
int i, fd; |
|
|
|
int i, fd; |
|
|
|
char *backend = NULL; |
|
|
|
char *backend = NULL; |
|
|
|
char *shell = NULL; |
|
|
|
char *shell = NULL; |
|
|
|
|
|
|
|
int32_t xwayland = 0; |
|
|
|
char *modules = NULL; |
|
|
|
char *modules = NULL; |
|
|
|
char *option_modules = NULL; |
|
|
|
char *option_modules = NULL; |
|
|
|
char *log = NULL; |
|
|
|
char *log = NULL; |
|
|
@ -1780,6 +1783,7 @@ int main(int argc, char *argv[]) |
|
|
|
{ WESTON_OPTION_STRING, "shell", 0, &shell }, |
|
|
|
{ WESTON_OPTION_STRING, "shell", 0, &shell }, |
|
|
|
{ WESTON_OPTION_STRING, "socket", 'S', &socket_name }, |
|
|
|
{ WESTON_OPTION_STRING, "socket", 'S', &socket_name }, |
|
|
|
{ WESTON_OPTION_INTEGER, "idle-time", 'i', &idle_time }, |
|
|
|
{ WESTON_OPTION_INTEGER, "idle-time", 'i', &idle_time }, |
|
|
|
|
|
|
|
{ WESTON_OPTION_BOOLEAN, "xwayland", 0, &xwayland }, |
|
|
|
{ WESTON_OPTION_STRING, "modules", 0, &option_modules }, |
|
|
|
{ WESTON_OPTION_STRING, "modules", 0, &option_modules }, |
|
|
|
{ WESTON_OPTION_STRING, "log", 0, &log }, |
|
|
|
{ WESTON_OPTION_STRING, "log", 0, &log }, |
|
|
|
{ WESTON_OPTION_BOOLEAN, "help", 'h', &help }, |
|
|
|
{ WESTON_OPTION_BOOLEAN, "help", 'h', &help }, |
|
|
@ -1914,12 +1918,20 @@ int main(int argc, char *argv[]) |
|
|
|
goto out; |
|
|
|
goto out; |
|
|
|
|
|
|
|
|
|
|
|
weston_config_section_get_string(section, "modules", &modules, ""); |
|
|
|
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; |
|
|
|
goto out; |
|
|
|
|
|
|
|
|
|
|
|
if (load_modules(ec, option_modules, &argc, argv) < 0) |
|
|
|
if (load_modules(ec, option_modules, &argc, argv, &xwayland) < 0) |
|
|
|
goto out; |
|
|
|
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); |
|
|
|
section = weston_config_get_section(config, "keyboard", NULL, NULL); |
|
|
|
weston_config_section_get_bool(section, "numlock-on", &numlock_on, 0); |
|
|
|
weston_config_section_get_bool(section, "numlock-on", &numlock_on, 0); |
|
|
|
if (numlock_on) { |
|
|
|
if (numlock_on) { |
|
|
|