[gtk+] wayland: Use g_get_prgname() to get the xdg_surface.set_app_id string
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Use g_get_prgname() to get the xdg_surface.set_app_id string
- Date: Tue, 18 Aug 2015 01:07:22 +0000 (UTC)
commit e1fd87728dd841cf1d71025983107765e395b152
Author: Jonas Ådahl <jadahl gmail com>
Date: Tue Aug 18 08:38:07 2015 +0800
wayland: Use g_get_prgname() to get the xdg_surface.set_app_id string
Prior to this patch, the ID of the GtkApplication was always used for
clients which were GtkApplications. This would only be guaranteed to be
correct for D-Bus activatable programs. As a result, all
non-D-Bus-activatable applications would set the wrong ID making the
shell unable to find the corresponding .desktop file.
This change makes it so that the GDK backend always uses the name
passed to g_set_prgname, or the default value if not explicitly set, as
this more often corresponds to the .desktop file.
This means that in order to make D-Bus activatable applications set the
correct application ID, they must, for now, manually call
g_set_prgname() with their application ID (basename of the .desktop
file).
If g_get_prgname() returns NULL, fallback to gdk_get_program_class()
even though it will most likely never be correct according to the
xdg_surface.set_app_id specification.
https://bugzilla.gnome.org/show_bug.cgi?id=746435
gdk/wayland/gdkwindow-wayland.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index c700a56..a0901cf 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1018,9 +1018,7 @@ gdk_wayland_window_create_xdg_surface (GdkWindow *window)
if (window->state & GDK_WINDOW_STATE_FULLSCREEN)
xdg_surface_set_fullscreen (impl->xdg_surface, fullscreen_output);
- app_id = impl->application.application_id;
- if (app_id == NULL)
- app_id = g_get_prgname ();
+ app_id = g_get_prgname ();
if (app_id == NULL)
app_id = gdk_get_program_class ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]