Add option to rootston to start xwayland lazy

master
Vincent Vanlaer 7 years ago
parent c80bf1591e
commit 31861b3a7a

@ -60,6 +60,7 @@ struct roots_cursor_config {
struct roots_config { struct roots_config {
bool xwayland; bool xwayland;
bool xwayland_lazy;
struct wl_list outputs; struct wl_list outputs;
struct wl_list devices; struct wl_list devices;

@ -240,6 +240,9 @@ static int config_ini_handler(void *user, const char *section, const char *name,
if (strcmp(name, "xwayland") == 0) { if (strcmp(name, "xwayland") == 0) {
if (strcasecmp(value, "true") == 0) { if (strcasecmp(value, "true") == 0) {
config->xwayland = true; config->xwayland = true;
} else if (strcasecmp(value, "lazy") == 0) {
config->xwayland = true;
config->xwayland_lazy = true;
} else if (strcasecmp(value, "false") == 0) { } else if (strcasecmp(value, "false") == 0) {
config->xwayland = false; config->xwayland = false;
} else { } else {
@ -389,6 +392,7 @@ struct roots_config *roots_config_create_from_args(int argc, char *argv[]) {
} }
config->xwayland = true; config->xwayland = true;
config->xwayland_lazy = false;
wl_list_init(&config->outputs); wl_list_init(&config->outputs);
wl_list_init(&config->devices); wl_list_init(&config->devices);
wl_list_init(&config->keyboards); wl_list_init(&config->keyboards);

@ -835,7 +835,7 @@ struct roots_desktop *desktop_create(struct roots_server *server,
if (config->xwayland) { if (config->xwayland) {
desktop->xwayland = wlr_xwayland_create(server->wl_display, desktop->xwayland = wlr_xwayland_create(server->wl_display,
desktop->compositor, false); desktop->compositor, config->xwayland_lazy);
wl_signal_add(&desktop->xwayland->events.new_surface, wl_signal_add(&desktop->xwayland->events.new_surface,
&desktop->xwayland_surface); &desktop->xwayland_surface);
desktop->xwayland_surface.notify = handle_xwayland_surface; desktop->xwayland_surface.notify = handle_xwayland_surface;

Loading…
Cancel
Save