After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 398184 - Add support for new GNOME 2.18 media player key D-Bus interface
Add support for new GNOME 2.18 media player key D-Bus interface
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: general
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 400733 444841 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-01-18 23:25 UTC by Jan Arne Petersen
Modified: 2007-06-06 22:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (3.98 KB, patch)
2007-01-21 13:01 UTC, James "Doc" Livingston
none Details | Review
updated patch (5.47 KB, patch)
2007-01-25 07:19 UTC, James "Doc" Livingston
none Details | Review
mmkeys plugin (21.03 KB, patch)
2007-01-28 09:14 UTC, Jonathan Matthew
committed Details | Review
rhythmbox-0.9.7-mmkeys-plugin.patch (21.13 KB, patch)
2007-01-31 14:33 UTC, Bastien Nocera
rejected Details | Review
rhythmbox-0.9.7-mmkeys-plugin.patch take #2 (21.08 KB, patch)
2007-01-31 17:05 UTC, Bastien Nocera
rejected Details | Review

Description Jan Arne Petersen 2007-01-18 23:25:23 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.
Comment 1 James "Doc" Livingston 2007-01-21 13:01:15 UTC
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.
Comment 2 Jan Arne Petersen 2007-01-23 09:36:33 UTC
GrabMediaPlayerKeys should also be called when the main window gains focus.
Comment 3 James "Doc" Livingston 2007-01-25 07:19:58 UTC
Created attachment 81157 [details] [review]
updated patch

Added the above
Comment 4 James "Doc" Livingston 2007-01-25 22:54:05 UTC
*** Bug 400733 has been marked as a duplicate of this bug. ***
Comment 5 Jonathan Matthew 2007-01-28 09:14:55 UTC
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.
Comment 6 Bastien Nocera 2007-01-28 23:46:21 UTC
(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?
Comment 7 Jonathan Matthew 2007-01-29 09:33:55 UTC
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.
Comment 8 James "Doc" Livingston 2007-01-31 08:37:52 UTC
Looks fine to me.
Comment 9 Bastien Nocera 2007-01-31 14:33:58 UTC
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)
Comment 10 Bastien Nocera 2007-01-31 17:05:25 UTC
Created attachment 81608 [details] [review]
rhythmbox-0.9.7-mmkeys-plugin.patch take #2

Updated, there's no "corelib" in 0.9.7
Comment 11 Jonathan Matthew 2007-02-01 22:11:15 UTC
Committed to svn.  I tested the saved session case on a current ubuntu feisty system and it worked correctly.
Comment 12 Jonathan Matthew 2007-06-06 22:41:59 UTC
*** Bug 444841 has been marked as a duplicate of this bug. ***