From eae8ab7bd869fc8221d7e1cdac17f7191a2befc4 Mon Sep 17 00:00:00 2001 From: Aleksandr Mezin Date: Sat, 9 Dec 2023 02:09:55 +0200 Subject: [PATCH] Set app id/class for the popup surface This should allow other apps to detect wl-clipboard and implement the necessary workarounds. --- src/types/shell-surface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/types/shell-surface.c b/src/types/shell-surface.c index 1940d4d..2391488 100644 --- a/src/types/shell-surface.c +++ b/src/types/shell-surface.c @@ -67,6 +67,7 @@ void shell_surface_init_wl_shell_surface(struct shell_surface *self) { wl_shell_surface_add_listener(proxy, &wl_shell_surface_listener, self); wl_shell_surface_set_toplevel(proxy); wl_shell_surface_set_title(proxy, "wl-clipboard"); + wl_shell_surface_set_class(proxy, "com.github.bugaevc.wl-clipboard"); self->do_destroy = destroy_wl_shell_surface; } @@ -119,6 +120,7 @@ void shell_surface_init_xdg_surface(struct shell_surface *self) { self->proxy2 = (struct wl_proxy *) toplevel; xdg_toplevel_add_listener(toplevel, &xdg_toplevel_listener, self); xdg_toplevel_set_title(toplevel, "wl-clipboard"); + xdg_toplevel_set_app_id(toplevel, "com.github.bugaevc.wl-clipboard"); self->do_destroy = destroy_xdg_surface; }