Only enable MPRIS global shortcuts on demand
ClosedPublic

Authored by davidedmundson on Jun 5 2017, 12:02 PM.

Details

Summary

The lockscreen uses the MPRIS dataengine. This leads to two applications
registring the service using the same component name which leads to the
shortcuts not working when the lock screen closes.

We want to have the applet register the shortcuts, but not every
dataengine user.

Ideally this shouldn't be in the dataengine either because DataEngines
are read only. This moves the logic to the service which is writable and
registers the shortcuts for the multiplexer there when requested from
the applet.

BUG: 380526
FIXED-IN: 5.10.1

Test Plan

Opened media player.
Used play/pause shortcut. (the only one my keyboard has)

Diff Detail

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
davidedmundson created this revision.Jun 5 2017, 12:02 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 5 2017, 12:02 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik accepted this revision.Jun 5 2017, 12:07 PM
broulik added a subscriber: broulik.

Good idea. I'm somewhat concerned by the fact that media controller applet only loads when you have an mpris service running and then we have applications like Amarok that also try to register them which might do so before we do this here? Certainly better approach than my original patch.

dataengines/mpris2/multiplexedservice.h
43

Doesn't this need to be registered in some .services file? Or is that just needed for "startOperationCall"?

This revision is now accepted and ready to land.Jun 5 2017, 12:07 PM
This revision was automatically updated to reflect the committed changes.