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 788217 - Support snap packages for sandboxed app IDs
Support snap packages for sandboxed app IDs
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-09-26 21:33 UTC by Marco Trevisan (Treviño)
Modified: 2017-10-21 02:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Window: support snap packages for sandboxed app IDs (4.70 KB, patch)
2017-09-26 21:33 UTC, Marco Trevisan (Treviño)
none Details | Review
Window: support snap packages for sandboxed app IDs (5.06 KB, patch)
2017-09-26 21:51 UTC, Marco Trevisan (Treviño)
none Details | Review
Window: support snap packages for sandboxed app IDs (5.06 KB, patch)
2017-09-27 05:12 UTC, Marco Trevisan (Treviño)
none Details | Review
Window: support snap packages for sandboxed app IDs (5.47 KB, patch)
2017-09-27 13:38 UTC, Marco Trevisan (Treviño)
committed Details | Review

Description Marco Trevisan (Treviño) 2017-09-26 21:33:06 UTC
In order to get snap applications to be proprely matched in
gnome shell we need to fetch the app id from the snap security
profile and generate the .desktop basename from that.

Attached patch is intented to be for the stable branch,
while we should break the API for next release replacing
  meta_window_get_flatpak_id
with
  meta_window_get_sandboxed_app_id
Comment 1 Marco Trevisan (Treviño) 2017-09-26 21:33:08 UTC
Created attachment 360499 [details] [review]
Window: support snap packages for sandboxed app IDs

For now we abuse of meta_window_get_flatpak_id not to break the APIs,
so that it's working seamlessly in gnone shell too.

Rename flatpak_id to sandboxed_app_id internally to get prepared to the future
API.
Comment 2 Marco Trevisan (Treviño) 2017-09-26 21:51:13 UTC
Created attachment 360501 [details] [review]
Window: support snap packages for sandboxed app IDs

For now we abuse of meta_window_get_flatpak_id not to break the APIs,
so that it's working seamlessly in gnone shell too.

Rename flatpak_id to sandboxed_app_id internally to get prepared to the future
API.
Comment 3 Marco Trevisan (Treviño) 2017-09-27 05:12:10 UTC
Created attachment 360512 [details] [review]
Window: support snap packages for sandboxed app IDs

For now we abuse of meta_window_get_flatpak_id not to break the APIs,
so that it's working seamlessly in gnone shell too.

Rename flatpak_id to sandboxed_app_id internally to get prepared to the future
API.
Comment 4 Marco Trevisan (Treviño) 2017-09-27 13:38:31 UTC
Created attachment 360534 [details] [review]
Window: support snap packages for sandboxed app IDs

For now we abuse of meta_window_get_flatpak_id not to break the APIs,
so that it's working seamlessly in gnone shell too.

Rename flatpak_id to sandboxed_app_id internally to get prepared to the future
API.
Comment 5 Jonas Ådahl 2017-09-27 13:49:46 UTC
Review of attachment 360534 [details] [review]:

Looks reasonable as a stop-gap solution for 3.26 (as we can't introduce/change API), as the assumptions made by gnome-shell (using the getter API that is abused here) are still valid for snap applications. For 3.28 we should adapt the API, and renaming 'meta_window_get_flatpak_id()' to 'meta_window_get_sandbox_app_id()' seems like a reasonable thing to do to me, as a window will never be sandboxed by two frameworks at the same time.

commit message subject nit: 'window: Support snap packages for sandboxed app Ids' (notice capitalization).
Comment 6 Marco Trevisan (Treviño) 2017-10-21 02:17:08 UTC
Fixed in https://git.gnome.org/browse/mutter/commit/?id=6dc499f
Comment 7 Marco Trevisan (Treviño) 2017-10-21 02:17:50 UTC
Review of attachment 360534 [details] [review]:

.