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>
This commit is contained in:
parent
f31f059934
commit
41f3419fee
|
@ -0,0 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Name=Xwayland
|
||||
Comment=A rootful instance of the Xwayland X11 server
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=System;
|
||||
NoDisplay=true
|
|
@ -173,3 +173,7 @@ xwayland_manpage = configure_file(
|
|||
configuration: manpage_config,
|
||||
)
|
||||
install_man(xwayland_manpage)
|
||||
|
||||
datadir = join_paths(get_option('prefix'), get_option('datadir'))
|
||||
desktopdir = join_paths(datadir, 'applications')
|
||||
install_data('desktop/org.freedesktop.Xwayland.desktop', install_dir : desktopdir)
|
||||
|
|
|
@ -489,6 +489,15 @@ xwl_window_rootful_update_title(struct xwl_window *xwl_window)
|
|||
xdg_toplevel_set_title(xwl_window->xdg_toplevel, title);
|
||||
}
|
||||
|
||||
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,
|
||||
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue