After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772614 - window: Expose Flatpak application ID
window: Expose Flatpak application ID
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on: 772613
Blocks: 772615
 
 
Reported: 2016-10-08 16:24 UTC by Florian Müllner
Modified: 2016-10-10 22:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Expose Flatpak application ID (3.36 KB, patch)
2016-10-08 16:24 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2016-10-08 16:24:00 UTC
See patch.
Comment 1 Florian Müllner 2016-10-08 16:24:04 UTC
Created attachment 337241 [details] [review]
window: Expose Flatpak application ID

GNOME Shell's window matching currently fails frequently with Flatpak
applications, as one of the primary hints used to link windows with
.desktop files - the WM_CLASS - no longer matches when flatpak renames
the exported .desktop file. Luckily, Flatpak provides us with a fail-safe
way to map from the PID to the corresponding application ID, so expose an
appropriate method that allows GNOME Shell to reliably match windows to
the corresponding Flatpak app.
Comment 2 Rui Matos 2016-10-10 20:29:03 UTC
Review of attachment 337241 [details] [review]:

::: src/core/window.c
@@ +772,3 @@
+  g_autofree char *info_filename = NULL;
+
+  g_clear_pointer (&window->flatpak_id, g_free);

need to free this on window destruction too
Comment 3 Florian Müllner 2016-10-10 22:55:29 UTC
Attachment 337241 [details] pushed as bccff5b - window: Expose Flatpak application ID

Eeeeks, thanks for the catch!