mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-03-17 05:34:19 -04:00
Merge 00e7172509 into dcd64ae48b
This commit is contained in:
commit
6cb985946b
3 changed files with 10 additions and 1 deletions
6
cage.c
6
cage.c
|
|
@ -248,6 +248,7 @@ usage(FILE *file, const char *cage)
|
||||||
" -m last Use only the last connected output\n"
|
" -m last Use only the last connected output\n"
|
||||||
" -s\t Allow VT switching\n"
|
" -s\t Allow VT switching\n"
|
||||||
" -v\t Show the version number and exit\n"
|
" -v\t Show the version number and exit\n"
|
||||||
|
" -i app-id Set application idendifier for the toplevel window\n"
|
||||||
"\n"
|
"\n"
|
||||||
" Use -- when you want to pass arguments to APPLICATION\n",
|
" Use -- when you want to pass arguments to APPLICATION\n",
|
||||||
cage);
|
cage);
|
||||||
|
|
@ -257,7 +258,7 @@ static bool
|
||||||
parse_args(struct cg_server *server, int argc, char *argv[])
|
parse_args(struct cg_server *server, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
while ((c = getopt(argc, argv, "dDhm:sv")) != -1) {
|
while ((c = getopt(argc, argv, "dDhm:svi:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'd':
|
case 'd':
|
||||||
server->xdg_decoration = true;
|
server->xdg_decoration = true;
|
||||||
|
|
@ -278,6 +279,9 @@ parse_args(struct cg_server *server, int argc, char *argv[])
|
||||||
case 's':
|
case 's':
|
||||||
server->allow_vt_switch = true;
|
server->allow_vt_switch = true;
|
||||||
break;
|
break;
|
||||||
|
case 'i':
|
||||||
|
server->app_id = optarg;
|
||||||
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
fprintf(stdout, "Cage version " CAGE_VERSION "\n");
|
fprintf(stdout, "Cage version " CAGE_VERSION "\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
|
||||||
4
output.c
4
output.c
|
|
@ -258,6 +258,10 @@ handle_new_output(struct wl_listener *listener, void *data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (server->app_id != NULL && wlr_output_is_wl(wlr_output)) {
|
||||||
|
wlr_wl_output_set_app_id(wlr_output, server->app_id);
|
||||||
|
}
|
||||||
|
|
||||||
output->wlr_output = wlr_output;
|
output->wlr_output = wlr_output;
|
||||||
wlr_output->data = output;
|
wlr_output->data = output;
|
||||||
output->server = server;
|
output->server = server;
|
||||||
|
|
|
||||||
1
server.h
1
server.h
|
|
@ -75,6 +75,7 @@ struct cg_server {
|
||||||
bool return_app_code;
|
bool return_app_code;
|
||||||
bool terminated;
|
bool terminated;
|
||||||
enum wlr_log_importance log_level;
|
enum wlr_log_importance log_level;
|
||||||
|
const char *app_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
void server_terminate(struct cg_server *server);
|
void server_terminate(struct cg_server *server);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue