<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - GTK window icons are not honoured by wayland backend"
href="https://bugzilla.gnome.org/show_bug.cgi?id=791569#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - GTK window icons are not honoured by wayland backend"
href="https://bugzilla.gnome.org/show_bug.cgi?id=791569">bug 791569</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ebassi%40gmail.com" title="Emmanuele Bassi (:ebassi) <ebassi@gmail.com>"> <span class="fn">Emmanuele Bassi (:ebassi)</span></a>
</span></b>
<pre>(In reply to Daniel P. Berrange from <a href="show_bug.cgi?id=791569#c2">comment #2</a>)
<span class="quote">> How should applications get an icon displayed if they don't have a desktop
> file ?</span >
Applications on Linux are supposed to ship a desktop file. This is not a new
requirement, it's been the case for that for the past 15 years.
<span class="quote">> Also, how does it know what desktop file corresponds to an arbitrary running
> app ? It use of GtkApplication framework mandatory to get that working ?</span >
Of course, we strongly encourage you to use the GtkApplication class, because
it's the API we provide for writing applications.
The way it's implemented, if you don't use the GtkApplication class, is to do
the work yourself — mainly by setting the WM_CLASS property to the same name as
the desktop file name, except the '.desktop' extension.
On Wayland, you should be able to use the xdg-shell v6 interface to set the id
on the surface.
<span class="quote">> My immediate case is QEMU, which has a GTK frontend, but doesn't have a
> desktop file as it isn't an app you can just point & click to launch from
> the GUI. The only practical way to launch QEMU is from the shell CLI passing
> all the needed args to configure the virtual machine. We still want QEMU to
> have its window icon displayed though once running.</span >
You should add a desktop file with NoDisplay=true to have it not appear in the
launchers, and yet provide application metadata.
Since you're already using GTK, you should still be able to use GtkApplication
and GtkApplicationWindow, instead of a base GtkWindow, and thus set the
application id necessary for GNOME to match it.
Just remember that your application id must match the name of the desktop file,
minus the `.desktop` extension.</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>