inconsistent window focus behavior in web browsers

Bug #589116 reported by Keith Grizzell
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: firefox chromium-browser seamonkey-browser

This applies ONLY to Lucid (10.04).

PROBLEM:
When you open a second web browser window, sometimes it comes up on top (as expected) and sometimes it comes up behind the window that currently has the focus.

TO REPLICATE:
1) Close all open windows and turn off Desktop Effects.
2) Launch firefox.
3) Type something in the firefox window.
4) Without closing firefox, launch a different program and watch its window pop up on top.
5) Launch firefox again (so it should open a second, new window).

Notice that this new window comes up behind the window of the last program you launched. This is not the expected behavior, and was not the behavior in previous versions of Ubuntu.

NOTES:
1) If you don't type anything in the first firefox window (i.e. omit step 3 above), then upon launching the second window you get the expected behavior (it comes up in front).
2) This also seems to affect Chrome and SeaMonkey in exactly the same way, but not other programs as far as I can tell. (Not even Epiphany!)

description: updated
Ben Calot (lobacten)
Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
Ben Calot (lobacten) wrote :

Well, I found what may be a partial solution to this most annoying problem. If you have Desktop Effects turned on try this:

1. Go to System -> Preferences -> CompizConfig Settings Manager.
2. Click on the 'General Options' button.
3. Click the 'Focus & Rise Behavior' tab.
4. Change the 'Focus Prevention Level' drop down to 'off'.

Some quick testing seems to indicate success, I hope it lasts and doesn't produce nasty side-effects.

Revision history for this message
Keith Grizzell (grizzell) wrote :

That does seem to work, as does the same procedure except changing step 4 to

 4. Edit the 'Focus Prevention Windows' to read "!(class=Polkit-gnome-authentication-agent-1) & !(class=Firefox) & !(class=SeaMonkey) & !(class=Chromium-browser) & !(class=Google-chrome)" (without the quotes).

That should exempt the indicated types of windows from the Compiz focus prevention behavior (as would step 4 in the previous comment, but this alternative should only affect the indicated types of windows).

Clearly this isn't ideal, especially since it does nothing if you aren't running Compiz. For anyone in that boat, a workaround might be to use something like Devil's Pie (Ubuntu package: devilspie) to control what happens to windows when they are opened. (I've never used it personally...)

-----------
After installing Ubuntu 9.10 and various versions of Firefox on both 10.04 and 9.10, I have decided this isn't a Firefox issue (or at least if it is, then it only manifests itself in 10.04). Notably, if you install Epiphany (the true default Gnome browser), it does not have any issues at all. My best guess at this point is that something in the upgrade from Gnome 2.28 to 2.30 (probably in the window manager, Metacity) caused this change in behavior. Next up (as time permits), replacing Gnome 2.30 with 2.28 in a Lucid Lynx install to see what effect that has. (Karmic Koala used 2.28, and had no problems...)

description: updated
Revision history for this message
dino99 (9d9) wrote :

outdated report followed by so many new releases

Changed in firefox (Ubuntu):
status: Confirmed → Invalid
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.