GNOME Bugzilla – Bug 398184
Add support for new GNOME 2.18 media player key D-Bus interface
Last modified: 2007-06-06 22:41:59 UTC
The current implementation of multimedia key support in rhythmbox (grab the keys with XGrabKey) will not work any longer in GNOME 2.18 because the keys will be grabed by the GnomeSettingsDaemon. There is a new D-Bus which should be used now. See bug 133815. An implementation for totem can be found at bug 394341 and for banshee at bug 395433.
Created attachment 80806 [details] [review] patch This patch implements support for the above. It would be good to get some testing on a system with the old (< 2.17.x) Gnome.
GrabMediaPlayerKeys should also be called when the main window gains focus.
Created attachment 81157 [details] [review] updated patch Added the above
*** Bug 400733 has been marked as a duplicate of this bug. ***
Created attachment 81352 [details] [review] mmkeys plugin moves existing (XGrabKey) and new (dbus) media player keys support into a plugin, only falling back to XGrabKey if the dbus service can't be found.
(In reply to comment #5) > Created an attachment (id=81352) [edit] > mmkeys plugin > > moves existing (XGrabKey) and new (dbus) media player keys support into a > plugin, only falling back to XGrabKey if the dbus service can't be found. Couldn't this be a race if Rhythmbox is restarted as part of a saved session?
If the service is not running when we try to access it, dbus will attempt to start it (if it can find a .service file for it). I guess this might result in multiple attempts at starting the settings daemon, but it looks like it will handle that OK. Passing --disable-mmkeys to ./configure will compile out the old XGrabKey code, leaving the new dbus code intact. Distributions that will ship a new enough gnome-settings-daemon should probably use this flag. Maybe it should be the default.
Looks fine to me.
Created attachment 81594 [details] [review] rhythmbox-0.9.7-mmkeys-plugin.patch Patch to apply to stock 0.9.7 (as used in Fedora's rawhide package)
Created attachment 81608 [details] [review] rhythmbox-0.9.7-mmkeys-plugin.patch take #2 Updated, there's no "corelib" in 0.9.7
Committed to svn. I tested the saved session case on a current ubuntu feisty system and it worked correctly.
*** Bug 444841 has been marked as a duplicate of this bug. ***