diff --git a/src/main.c b/src/main.c index 7ad52a5..3d353a4 100644 --- a/src/main.c +++ b/src/main.c @@ -68,6 +68,7 @@ static bool have_format = false; static bool do_run = true; struct window* window = NULL; +const char* app_id = "wlvncc"; static void on_seat_capability_change(struct seat* seat) { @@ -308,7 +309,7 @@ static const struct xdg_toplevel_listener xdg_toplevel_listener = { .close = xdg_toplevel_close, }; -static struct window* window_create(const char* title) +static struct window* window_create(const char* app_id, const char* title) { struct window* w = calloc(1, sizeof(*w)); if (!w) @@ -330,6 +331,7 @@ static struct window* window_create(const char* title) xdg_toplevel_add_listener(w->xdg_toplevel, &xdg_toplevel_listener, w); + xdg_toplevel_set_app_id(w->xdg_toplevel, app_id); xdg_toplevel_set_title(w->xdg_toplevel, title); wl_surface_commit(w->wl_surface); @@ -388,7 +390,7 @@ int on_vnc_client_alloc_fb(struct vnc_client* client) int height = vnc_client_get_height(client); int stride = vnc_client_get_stride(client); - window = window_create(vnc_client_get_desktop_name(client)); + window = window_create(app_id, vnc_client_get_desktop_name(client)); if (!window) return -1; @@ -448,6 +450,7 @@ static int usage(int r) fprintf(r ? stderr : stdout, "\ Usage: wlvncc
[port]\n\ \n\ + -a,--app-id=