Bug 62917 - Raise method needs a timestamp parameter to work with Focus Stealing prevention
Summary: Raise method needs a timestamp parameter to work with Focus Stealing prevention
Status: RESOLVED MOVED
Alias: None
Product: MPRIS
Classification: Unclassified
Component: spec (show other bugs)
Version: unspecified
Hardware: Other All
: medium major
Assignee: Alex Merry
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 49380
  Show dependency treegraph
 
Reported: 2013-03-29 23:12 UTC by Marco Trevisan (Treviño)
Modified: 2018-10-13 10:02 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Add org.mpris.MediaPlayer2.Activate (3.98 KB, patch)
2013-10-29 19:32 UTC, Lars Uebernickel
Details | Splinter Review

Description Marco Trevisan (Treviño) 2013-03-29 23:12:57 UTC
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.
Comment 1 Lars Uebernickel 2013-04-03 17:19:22 UTC
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 ;)
Comment 2 Alex Merry 2013-04-04 16:03:08 UTC
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.
Comment 3 Lars Uebernickel 2013-10-29 19:32:30 UTC
Created attachment 88321 [details] [review]
Add org.mpris.MediaPlayer2.Activate

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.
Comment 4 Alex Merry 2015-08-24 11:17:43 UTC
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.
Comment 5 GitLab Migration User 2018-10-13 10:02:12 UTC
-- 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.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.