Add option to disable window decoration

Add --window-borderless parameter.

Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
Diego Fernando Díaz A
2019-08-29 00:25:17 -05:00
committed by Romain Vimont
parent 9fd7a80a89
commit 59bc5bc1f5
5 changed files with 18 additions and 3 deletions

View File

@@ -107,6 +107,9 @@ static void usage(const char *arg0) {
" -v, --version\n"
" Print the version of scrcpy.\n"
"\n"
" --window-borderless\n"
" Disable window decorations (display borderless window).\n"
"\n"
" --window-title text\n"
" Set a custom window title.\n"
"\n"
@@ -370,6 +373,7 @@ guess_record_format(const char *filename) {
#define OPT_WINDOW_Y 1008
#define OPT_WINDOW_WIDTH 1009
#define OPT_WINDOW_HEIGHT 1010
#define OPT_WINDOW_BORDERLESS 1011
static bool
parse_args(struct args *args, int argc, char *argv[]) {
@@ -398,6 +402,8 @@ parse_args(struct args *args, int argc, char *argv[]) {
{"window-y", required_argument, NULL, OPT_WINDOW_Y},
{"window-width", required_argument, NULL, OPT_WINDOW_WIDTH},
{"window-height", required_argument, NULL, OPT_WINDOW_HEIGHT},
{"window-borderless", no_argument, NULL,
OPT_WINDOW_BORDERLESS},
{NULL, 0, NULL, 0 },
};
@@ -495,6 +501,9 @@ parse_args(struct args *args, int argc, char *argv[]) {
return false;
}
break;
case OPT_WINDOW_BORDERLESS:
opts->window_borderless = true;
break;
case OPT_PUSH_TARGET:
opts->push_target = optarg;
break;