Evince hijacks global multimedia keys

Bug #263779 reported by Iain Lane
76
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Evince
Fix Released
Medium
GNOME Settings Daemon
Fix Released
Medium
evince (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs
Nominated for Intrepid by Chow Loong Jin
gnome-settings-daemon (Ubuntu)
Fix Released
Undecided
Chow Loong Jin
Nominated for Intrepid by Chow Loong Jin

Bug Description

When Evince starts after a media player in GNOME, The multimedia player keys no longer control the media player, but control Evince instead.

Test Case:
1. Start Rhythmbox
2. Press media player keys, and observe that Rhythmbox responds
3. Start Evince
4. Press media player keys, and observe that Evince responds.
5. Switch to another window, and press media player keys. Observe that there is no response from Rhythmbox or Evince
6. Close Rhythmbox and start it again.
7. Press media player keys. Observe that Rhythmbox responds.

What should happen:
Evince registers with gnome-settings-daemon with time=1, whereas Rhythmbox registers with gnome-settings-daemon with time=0, which is a special value for "current time". Hence, Rhythmbox should have priority over Evince when it comes to grabbing the multimedia keys, even if Evince is started after Rhythmbox.

Revision history for this message
Iain Lane (laney) wrote :

If you want a quicker repro, just launch and then exit Evince, missing out step 4. The hotkeys will then be nonfunctional.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for the report, I've tried to reproduce that but it works fine, evince indeed fullscreen itself, after close it the shortcuts works ok without any issues, can you try the same with another new user created on your system? Wthat's the value of the keybindings on the gnome-keybindings-properties after close evince?

Changed in evince:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Phil Bull (philbull) wrote :

I also have this issue. It's extremely annoying!

Whenever evince is running, it "takes over" my media keys. When I press the "Play/Pause" button on my keyboard, evince goes fullscreen. What should happen is that the audio player (e.g. Rhythmbox) starts or stops playing. Pressing the "Previous" or "Next" keys skips forward or back a page in evince. What should happen is that the audio player plays the next or previous track.

The original function of the keys is not returned once evince is closed unless you focus Rhythmbox at some point:

 1. Start Rhythmbox.
 2. Press "Play/Pause" key. Track starts playing.
 3. Open evince and switch focus to another application (e.g. gedit, Firefox).
 4. Press "Play/Pause" key. Evince goes fullscreen.
 5. Exit evince.
 6. Press "Play/Pause" key. Nothing happens.
 7. Focus Rhthmbox.
 8. Press "Play/Pause" key. Tracks is paused (expected behaviour).
 9. Defocus Rhythmbox. Press "Play/Pause" key. Track starts playing (expected behaviour).

In summary, evince should not capture the multimedia keys, nor indeed any global keyboard shortcuts.

Settings in System -> Preferences -> Keyboard Shortcuts:
    Play (or Play/Pause): XF86AudioPlay
    Previous Track: XF86AudioPrev
    Next Track: XF86AudioNext

evince 2.23.6-0ubuntu1
rhythmbox 0.11.6svn20080807-0ubuntu1
gnome-settings-daemon 2.23.91-0ubuntu1

Ubuntu intrepid, fully updated (Wednesday 3-Sept-08)

Revision history for this message
Pedro Villavicencio (pedro) wrote :

May someone having the issue forward this upstream to bugzilla.gnome.org? I'm unable to reproduce the behavior in my Intrepid installation, thanks.

Revision history for this message
Phil Bull (philbull) wrote :
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for sent it upstream!, linking the report.

Changed in evince:
status: Incomplete → Triaged
Changed in evince:
status: Unknown → New
Changed in evince:
status: New → Fix Released
Revision history for this message
Chow Loong Jin (hyperair) wrote :

Marking fixed released, as the change reported in the upstream Evince bug is fixed, and in the current Intrepid version (2.24.1-0ubuntu1).

Changed in evince:
status: Triaged → Fix Released
Revision history for this message
Chow Loong Jin (hyperair) wrote :

Here's a debdiff for Intrepid, containing the patch in the upstream gnome-settings-daemon bug. I've uploaded the changed package to my PPA at http://launchpad.net/~hyperair/+archive so please test.

Revision history for this message
Iain Lane (laney) wrote :

Can we hold off until upstream has given its acceptance to this patch? Thanks for your contribution though.

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 263779] Re: Evince takes over global shortcut keys

On Fri, 2008-11-07 at 20:40 +0000, Iain Lane wrote:
> Can we hold off until upstream has given its acceptance to this patch?
> Thanks for your contribution though.
>
Yes I think that'll be a good idea.
--
Chow Loong Jin

Changed in gnome-settings-daemon:
assignee: nobody → hyperair
status: New → In Progress
Revision history for this message
RedStarLabs.org (redstarlabs) wrote : Re: Evince takes over global shortcut keys

I have the 2.24.1-0ubuntu1 version installed, but the issue is still there...

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 263779] Re: Evince takes over global shortcut keys

On Wed, 2008-11-12 at 18:14 +0000, RedStarLabs.org wrote:
> I have the 2.24.1-0ubuntu1 version installed, but the issue is still
> there...
>
Well, the patch hasn't been committed yet, so of course it's still
there.
--
Chow Loong Jin

Revision history for this message
Chow Loong Jin (hyperair) wrote :

Alright, since the patch has been accepted upstream, I've backported the
patch. Here's the debdiff.

--
Chow Loong Jin

description: updated
Revision history for this message
Michael Vogt (mvo) wrote :

The gnome-settings-daemon task is fixed in jaunty (we have the upstream fix there). Please add a intrepid task if needed.

Changed in gnome-settings-daemon:
status: In Progress → Fix Released
Changed in gnome-settings-daemon:
status: Unknown → Fix Released
Revision history for this message
Valentin Neacsu (valentin.neacsu) wrote :

This bug is still present in Intrepid with latest updates installed. I'd mark it myself I have no clue how to do it, and rather than breaking something I'd rather someone else do it.

Thanks.

Revision history for this message
Dimitrios Symeonidis (azimout) wrote :

please ignore valentin's last comment, it's referring to a different bug

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 263779] Re: Evince hijacks global multimedia keys

Even then, the fix for gnome-settings-daemon hasn't been backported to
Intrepid. It is fixed in Jaunty though.
--
Chow Loong Jin

Revision history for this message
Eviltechie (eviltechie) wrote :

Something else to mention. F5 is bound to presentation, and F11 is bound to fullscreen. Therefore, there is no use for presentation to be bound to the play button.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Sun, 2009-05-31 at 16:58 +0000, Eviltechie wrote:
> Something else to mention. F5 is bound to presentation, and F11 is bound
> to fullscreen. Therefore, there is no use for presentation to be bound
> to the play button.
>
Yes there is. Some notebooks (read: Dell XPS) have remote controls which
only contain media control buttons. Don't you think it would be awesome
to control Evince for a presentation using those buttons?
--
Regards,
Chow Loong Jin

Revision history for this message
Dana Goyette (danagoyette) wrote :

This misfeature irritates me every time I have to use Evince. I can understand having the thing skip pages when it's ALREADY in fullscreen mode... but consider the current behavior:

I'm reading a PDF document while listening to music, and try to skip tracks.... what happens? Evince goes to the next page, so I have to manually go back, and possibly lose track of where I am reading.

Now, I try to pause the music, and Evince hijacks my whole screen.... so I have to press F11 to un-fullscreen it.
And when I try to resume the music, Evince does it again.

What I think it should do: NOT take over play-pause, and only act on track-skip hotkeys when already in fullscreen mode. That way, you can still use it for "presentation mode". The ability to change pages with a remote makes sense. The ability to change from windowed to fullscreen (and not back again) does not make sense -- why not just start the presentation with the PDF fullscreen already?

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Sunday 30,May,2010 06:21 AM, Dana Goyette wrote:
> This misfeature irritates me every time I have to use Evince. I can
> understand having the thing skip pages when it's ALREADY in fullscreen
> mode... but consider the current behavior:
>
> I'm reading a PDF document while listening to music, and try to skip
> tracks.... what happens? Evince goes to the next page, so I have to
> manually go back, and possibly lose track of where I am reading.
>
> Now, I try to pause the music, and Evince hijacks my whole screen.... so I have to press F11 to un-fullscreen it.
> And when I try to resume the music, Evince does it again.
>
> What I think it should do: NOT take over play-pause, and only act on
> track-skip hotkeys when already in fullscreen mode. That way, you can
> still use it for "presentation mode". The ability to change pages with
> a remote makes sense. The ability to change from windowed to fullscreen
> (and not back again) does not make sense -- why not just start the
> presentation with the PDF fullscreen already?
>

Hi Dana,

As can be seen at the top of the bug report, the bug is marked as fix released
on all the affected packages. Could you test whether the bug still occurs with
the latest Ubuntu version?

If it does continue to occur, please include the following bits of information:
* the version of evince
* the version of gnome-settings-daemon
* what media player you are using
* the version of the media player you are using

Thank you.

--
Kind regards,
Chow Loong Jin

Revision history for this message
Dana Goyette (danagoyette) wrote :

evince: 2.30.1-0ubuntu3

gnome-settings-daemon: 2.30.1-0ubuntu1

music player: quodlibet 2.1-4

Changed in evince:
importance: Unknown → Medium
Changed in gnome-settings-daemon:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.