[Wayland-bugs] [Bug 746435] wayland: Use g_get_prgname as the xdg surface application id
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Fri Mar 20 03:45:31 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=746435
Matthias Clasen <mclasen at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mclasen at redhat.com
--- Comment #5 from Matthias Clasen <mclasen at redhat.com> ---
(In reply to Jonas Ã…dahl from comment #3)
> (In reply to Matthias Clasen from comment #2)
> > Review of attachment 299790 [details] [review] [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).
Calling it in realize seems totally fine - it is where we do this under X.
>
> 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)
One thing that plays into this is that the identity desktop file basename ==
busname is only mandatory for applications which have DBusActivatable=true in
the desktop files, while desktop file basename == application id should always
hold.
Another thing to notice is that under X, the application id is not actually
needed on the bus, from what I can see, since we also set _GTK_UNIQUE_BUS_NAME
as a window property, and that seems to be what the shell uses (e.g. gucharmap
does not take org.gnome.Charmap as a well-known name, yet its appmenu works
fine).
--
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/9824d425/attachment-0001.html>
More information about the wayland-bugs
mailing list