<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - wayland: Use g_get_prgname as the xdg surface application id"
href="https://bugzilla.gnome.org/show_bug.cgi?id=746435#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - wayland: Use g_get_prgname as the xdg surface application id"
href="https://bugzilla.gnome.org/show_bug.cgi?id=746435">bug 746435</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=jadahl%40gmail.com" title="Jonas Ådahl <jadahl@gmail.com>"> <span class="fn">Jonas Ådahl</span></a>
</span></b>
<pre>(In reply to Matthias Clasen from <a href="show_bug.cgi?id=746435#c2">comment #2</a>)
<span class="quote">> Review of <span class=""><a href="attachment.cgi?id=299790&action=diff" name="attach_299790" title="wayland: Use g_get_prgname as the xdg surface application id">attachment 299790</a> <a href="attachment.cgi?id=299790&action=edit" title="wayland: Use g_get_prgname as the xdg surface application id">[details]</a></span> <a href='review?bug=746435&attachment=299790'>[review]</a> [review]:
>
> If you look at gdk_pre_parse, the two are more or less the same. I'm not
> sure this is sufficiently better.</span >
Right, but GApplication sometimes override prgname which made it occasionally
work.
<span class="quote">>
> 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.</span >
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).
<span class="quote">>
> 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 ?</span >
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)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>