The MPRIS Raise method of the MediaPlayer2 interface does not require a timestamp parameter and this leads to focus issues in recent linux window managers (such as compiz, mutter or xfce) that need the event timestamp that triggered the call in order to correctly focus and raise a window. Otherwise the focus stealing prevention of the window managers would avoid a media player to be fully raised.
See for example this Ubuntu bug: https://bugs.launchpad.net/ayatana-design/+bug/627195
So, we should deprecate this method and provide another - say - RaiseWithTimestamp method that players should use to correctly raise their windows.
Instead of only passing a timestamp, this could be the same platform data that GApplication uses in its Activate method (of type "asv"). This would make passing these kinds of things more uniform and easier to handle for toolkits, as well as being extensible.
Maybe we could even call it Activate ;)
Not convinced that following GApplication's slightly esoteric form is helpful. The name's fine, but the way it encodes/decodes the timestamp is kinda weird.
We'll probably need a CanRaiseWithTimestamp property or some such to let clients know whether this is implemented. Or a HasRaiseWithTimestamp, which can be used in combination with CanRaise.
Created attachment 88321 [details] [review]
Alex, the desktop entry spec recently gained support for org.freedesktop.Application, which has a method Activate() that takes a platform data. I think it makes sense to reuse this terminology and the platform-data convention.
The attached patch deprecates Raise() and CanRaise in favor of Activate() and CanActivate.
So... this has been sitting in my inbox for a *long* time, sorry.
I think a better approach would be to suggest clients make direct use of the desktop entry spec, rather than duplicating the methods here. We already have a property to direct clients to the desktop file for the media player, so they can check that desktop file for whether it can be activated, and call the org.freedesktop.Application Activate() method.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/mpris-spec/issues/7.