[Task Manager] Honor "kde:pid" Metadata for when window PID isn't player PID
ClosedPublic

Authored by broulik on Jun 23 2017, 2:04 PM.

Details

Summary

In plasma-browser-integration the browser window is a different PID from the host that owns the MPris service leading to no media controls in task manager.

Test Plan

I now get media controls in TM for Chrome windows, both in context menu and tooltip.
VLC player still has them, too.

Diff Detail

Repository
R119 Plasma Desktop
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 23 2017, 2:04 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 23 2017, 2:04 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
hein accepted this revision.Jun 23 2017, 2:07 PM
This revision is now accepted and ready to land.Jun 23 2017, 2:07 PM

why did you chose this over overriding InstancePid in the dataengine?

This revision was automatically updated to reflect the committed changes.

why did you chose this over overriding InstancePid in the dataengine?

Because it's not the actual PID of the process. The mapping is only really needed in TM (media controller applet doesn't care), so I didn't want to "lie" about that and rather have the view do it if neccessary. (I could have added a new role to the data engine, though)