More flags for compositor; don't run again unless nested
This commit is contained in:
parent
528360486a
commit
f6bbb8b2cb
@ -103,10 +103,29 @@ static int parse_args(int argc, char * argv[], int * out) {
|
|||||||
case 'n':
|
case 'n':
|
||||||
yutani_options.nested = 1;
|
yutani_options.nested = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'g':
|
||||||
|
{
|
||||||
|
char * c = strstr(argv[i+1], "x");
|
||||||
|
if (c) {
|
||||||
|
*c = '\0';
|
||||||
|
c++;
|
||||||
|
yutani_options.nest_width = atoi(argv[i+1]);
|
||||||
|
yutani_options.nest_height = atoi(c);
|
||||||
|
}
|
||||||
|
i += 2;
|
||||||
|
goto _next;
|
||||||
|
}
|
||||||
|
case 'h':
|
||||||
|
return usage(argv);
|
||||||
|
default:
|
||||||
|
fprintf(stderr, "Unrecognized option: %c\n", c);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_next:
|
||||||
|
;
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
static struct option long_opts[] = {
|
static struct option long_opts[] = {
|
||||||
@ -1822,6 +1841,11 @@ int main(int argc, char * argv[]) {
|
|||||||
yg->backend_ctx = init_graphics_yutani_double_buffer(yg->host_window);
|
yg->backend_ctx = init_graphics_yutani_double_buffer(yg->host_window);
|
||||||
yg->stride = yg->backend_ctx->width * 4;
|
yg->stride = yg->backend_ctx->width * 4;
|
||||||
} else {
|
} else {
|
||||||
|
char * d = getenv("DISPLAY");
|
||||||
|
if (d && *d) {
|
||||||
|
fprintf(stderr, "DISPLAY is already set but not running nested. This is probably wrong.\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
_static_yg = yg;
|
_static_yg = yg;
|
||||||
signal(SIGWINEVENT, yutani_display_resize_handle);
|
signal(SIGWINEVENT, yutani_display_resize_handle);
|
||||||
yg->backend_ctx = init_graphics_fullscreen_double_buffer();
|
yg->backend_ctx = init_graphics_fullscreen_double_buffer();
|
||||||
|
Loading…
Reference in New Issue
Block a user