[Notifications] Read BAMF_DESKTOP_FILE_HINT from environment
ClosedPublic

Authored by broulik on Jun 18 2019, 1:23 PM.

Details

Summary

This is a similar situation we have with Flatpak when the desktop entry the application thinks it owns is actually different.
In Snap this environment variable is passed to the process. When no service was found, try reading it.

Test Plan

5.16 branch

My Spotify snap now identifies as Spotify and I can configure notifications for it.

  • Notification without app name still resolves to process name properly
  • Service lookup for normal apps still works
  • Job view without an app name still resolves to process name properly

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Jun 18 2019, 1:23 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 18 2019, 1:23 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jun 18 2019, 1:23 PM
sitter accepted this revision.Jun 18 2019, 3:20 PM

Not a fan of treating the pid like a bool in conditionals, looks lovely other than that.

This revision is now accepted and ready to land.Jun 18 2019, 3:20 PM
This revision was automatically updated to reflect the committed changes.