[Wayland-bugs] [Bug 746435] wayland: Use g_get_prgname as the xdg surface application id

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Thu Mar 19 20:33:45 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=746435

--- Comment #3 from Jonas Ã…dahl <jadahl at gmail.com> ---
(In reply to Matthias Clasen from comment #2)
> Review of attachment 299790 [details] [review]:
> 
> If you look at gdk_pre_parse, the two are more or less the same. I'm not
> sure this is sufficiently better.

Right, but GApplication sometimes override prgname which made it occasionally
work.

> 
> What we really need is the application id that gets passed as the second
> argument to gdk_wayland_window_set_dbus_properties_libgtk_only - but ware
> already using that, right ? At least if the application in question is using
> GtkApplication.

True. We call gdk_wayland_window_set_dbus_properties_libgtk_only too late
though. We can make it call earlier (handle_window_realize instead of
handle_window_map) but then we should maybe duplicate the data in
gdkwindow-wayland.c and set it after mapping (as MetaWindow won't have been
created in mutter yet otherwise).

> 
> Can you look at why this doesn't work in the cases you cite ? Maybe we just
> need to make a simplified version of that set_dbus_properties function (just
> setting the application_id) available for !GtkApplication apps ?

Where would this API be? I made a patch locally that adds a
gdk_wayland_window_set_application_id () that is called from
gtkapplication-wayland.c or should this be made platform generic?

Regarding how well it works, testing random applications trying to get the
application id first from the GtkApplication id, then g_get_prgname, and then
gdk_get_program_class ():

Correct (desktop file base name and application id):
gnome-maps (org.gnome.Maps)
gnome-contacts (org.gnome.Contacts)
glade (glade)
gnome-font-viewer (org.gnome.font-viewer)
evince (evince)

Half correct (desktop file name vs resulting application id):
gucharmap (gucharmap.desktop vs org.gnome.Charmap)
eog (eog.desktop vs org.gnome.eog.ApplicationService)
ibus-setup (ibus-setup.desktop vs main.py)

Using gdk_get_program_class () instead of g_get_prgname () makes the result
slightly worse (glade and evince will no longer be correct)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150320/52dabd8a/attachment.html>


More information about the wayland-bugs mailing list