summaryrefslogtreecommitdiff
path: root/hw/xwayland/xwayland-window.c
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2022-04-29 10:22:15 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2022-06-30 17:53:01 +0200
commit41f3419feeef292abd822ac578e0a8e1c57890e5 (patch)
tree480a56c277ddf6d35ccce9923af8962e626e8baa /hw/xwayland/xwayland-window.c
parentf31f059934ceb88c231f1f467349ed462dacc9e3 (diff)
downloadxserver-41f3419feeef292abd822ac578e0a8e1c57890e5.tar.gz
xwayland: set the app_id and install a desktop launcher
The app_id is used to identify applications (and group windows), some desktops (such as GNOME Shell) use it in their top bar. Set the XDG toplevel "app_id" to "org.freedesktop.Xwayland" and install a desktop file for Xwayland rootful. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw/xwayland/xwayland-window.c')
-rw-r--r--hw/xwayland/xwayland-window.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c
index a8dce8d45..f3ca987fd 100644
--- a/hw/xwayland/xwayland-window.c
+++ b/hw/xwayland/xwayland-window.c
@@ -490,6 +490,15 @@ xwl_window_rootful_update_title(struct xwl_window *xwl_window)
}
static void
+xwl_window_rootful_set_app_id(struct xwl_window *xwl_window)
+{
+ const char *app_id = "org.freedesktop.Xwayland";
+
+ if (xwl_window->xdg_toplevel)
+ xdg_toplevel_set_app_id(xwl_window->xdg_toplevel, app_id);
+}
+
+static void
xdg_surface_handle_configure(void *data,
struct xdg_surface *xdg_surface,
uint32_t serial)
@@ -594,6 +603,7 @@ xwl_create_root_surface(struct xwl_window *xwl_window)
NULL);
xwl_window_rootful_update_title(xwl_window);
+ xwl_window_rootful_set_app_id(xwl_window);
wl_surface_commit(xwl_window->surface);