[MPRIS] "TimeFocused" property?
Bastien Nocera
hadess at hadess.net
Thu Nov 7 14:38:26 CET 2013
Heya,
gnome-settings-daemon, which handles media-keys in GNOME, recently (in
GNOME 3.10) got support for MPRIS in addition to its own media-keys API.
This is the documentation for the gnome-settings-daemon API:
https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/media-keys/README.media-keys-API
and the API itself:
https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/media-keys/gsd-media-keys-manager.c#n79
as you can see, we could replace all of that with MPRIS, apart from one
thing, the "time" argument passed to GrabMediaPlayerKeys().
This is used for gnome-settings-daemon to know which one was the last
focused (or last used) media player so that keyboard keys are forwarded
to that player even if the player isn't focused.
I could track the last media player to appear on the bus, or the last
one we sent events to, but that would mean that unfocusable players (the
"daemon" kind) would get the benefit of that, and changing playback
using the media player gnome-shell extension wouldn't update that "last
focused" variable.
Any ideas?
Cheers
More information about the MPRIS
mailing list