<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body><span class="vcard"><a href="page.cgi?id=describeuser.html&login=mclasen%40redhat.com" title="Matthias Clasen <mclasen@redhat.com>"> <span class="fn">Matthias Clasen</span></a>
</span> changed
<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>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>mclasen@redhat.com
</td>
</tr></table>
<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#c5">Comment # 5</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=mclasen%40redhat.com" title="Matthias Clasen <mclasen@redhat.com>"> <span class="fn">Matthias Clasen</span></a>
</span></b>
<pre>(In reply to Jonas Ã…dahl from <a href="show_bug.cgi?id=746435#c3">comment #3</a>)
<span class="quote">> (In reply to Matthias Clasen from <a href="show_bug.cgi?id=746435#c2">comment #2</a>)
> > 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] [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).</span >
Calling it in realize seems totally fine - it is where we do this under X.
<span class="quote">>
> 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)</span >
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).</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>