← Back to team overview

compiz team mailing list archive

[Bug 627195] Re: Window management - Apps raised from indicators sometimes dont have the focus

 

Unity is not the problem here.
Indicator-session should actually pass the activation timestamp to the player when raising it.

However, the problem is that IndicatorSound is just calling the Raise()
method of the MPRIS dbus interface that most of the players are
implementing. See: http://specifications.freedesktop.org/mpris-
spec/latest/Media_Player.html#Method:Raise

As you see this method is not taking any parameter, while it should
actually take the timestamp of the click event (the one we get into
indicator-sound's MetadataMenuitem::handle_event), in order to work with
the Focus Stealing Prevention mechanism that the windows managers are
using nowadays (both compiz and mutter in fact).

I've opened a bug for the MPRIS specification at https://bugs.freedesktop.org/show_bug.cgi?id=62917 and I encourage you to complete it.
However this process can be long and until then the only way we have is to patch our players.

Basically what we need to do is *temporary* using the workaround shown in the bug linked below to bypass the focus stealing prevention when the Raise method is called on them:
https://bugzilla.gnome.org/show_bug.cgi?id=688830

** Bug watch added: freedesktop.org Bugzilla #62917
   https://bugs.freedesktop.org/show_bug.cgi?id=62917

** Also affects: mpris via
   https://bugs.freedesktop.org/show_bug.cgi?id=62917
   Importance: Unknown
       Status: Unknown

** Bug watch added: GNOME Bug Tracker #688830
   https://bugzilla.gnome.org/show_bug.cgi?id=688830

** Description changed:

  Ubuntu 11.10 beta
  compiz 1:0.9.5.94+bzr2803-0ubuntu5
  unity 4.16.0-0ubuntu1
  
  1. open banshee, start a song in it and minimize
  2. open another application lets say gnome-terminal
  3. click on the sound menu and select banshee
  
  What happens
  banshee icon in the launcher wiggles and banshee main window is not shown
  
  What should happen
  banshee main window should come to focus
  
  This is a long standing bug which Ted Gould thinks should be fixed at
  window manager's level.
  
  ====Some other observations=====
  The problem wont happen
  1. if every other app is minimized or
  2. Banshee is the only opened app or
  3. after opening gnome-terminal, banshee window is closed so that it hides to the SoundMenu and opened again
  
  =====Comment from Ted Gould=====
  <om26er> tedg, Hi! any thoughts on the long standing bug 627195 ? Its been there before unity so I guess we can conclude unity not to be responsible
  
  <tedg> om26er, My thought is that window managers should $%#$ get
  fixed... though I haven't convinced smspillaz of it yet.
+ 
+ =====The good rule=====
+ Indicator-session should present the players windows by passing to them the timestamp of the menu item activation event.
+ Unfortunately this is not trival as it sounds, since it needs a change to the MPRIS dbus specification.
+ See comment https://bugs.launchpad.net/ayatana-design/+bug/627195/comments/26 for more informations.
+ 
+ Window managers will obey to it.

-- 
You received this bug notification because you are a member of compiz
packagers, which is subscribed to compiz in Ubuntu.
https://bugs.launchpad.net/bugs/627195

Title:
  Window management - Apps raised from indicators sometimes dont have
  the focus

To manage notifications about this bug go to:
https://bugs.launchpad.net/ayatana-design/+bug/627195/+subscriptions