New windows are put in the background

Bug #129396 reported by Timo Aaltonen
48
This bug affects 3 people
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Fix Released
Low
Unassigned
metacity (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

Binary package hint: compiz

New windows are always put in the background unless the app opening it is in focus.

For instance opening a link from gnome-terminal opens the window in background, but if I move the mouse quickly on top of firefox (I'm using focus-follows-mouse), it is opened in foreground.

Also, sound-juicer popup telling that the rip is ready is sent to background unless the focus is on the main window.

Revision history for this message
Travis Watkins (amaranth) wrote :

Does this happen without focus-follows-mouse?

Changed in compiz:
status: New → Incomplete
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Yes it does. Actually, the same happened with feisty too (and another installation).

Changed in compiz:
importance: Undecided → Low
status: Incomplete → New
Revision history for this message
Xamusk (ronanpaixao) wrote :

Actually, that also happens with metacity in Feisty, so it maybe something else from compiz.

Changed in compiz:
importance: Low → Wishlist
Revision history for this message
Paul James (launchpad-peej) wrote :

I think I've come across the same bug (without focus-follows-mouse, with using compiz).

Open a Nautilus window to a directory of images, open one in eog. Eog launches and gains focus as expected. Then re-focus Nautilus and open another image, a new eog window appears behind Nautilus (presuming Nautilus is in the centre of the screen). This only occurs if an existing eog window is open and it does not appear to occur when not using compiz.

Revision history for this message
LKRaider (paul-eipper) wrote :

Happens for me in Metacity (Gutsy)

1. open Nautilus and launch a video file (opens in totem by default)
2. Totem gains focus
3. Go back to the Nautilus window and launch another video file
4. Video opens in Totem but does not gains focus (Totem stays behind the Nautilus window)

Again, this is in Metacity, without Compiz enabled.

Revision history for this message
Basilio Kublik (sourcercito) wrote :

Hi there
Is this reproducible under the live environment of the desktop cd of Hardy Heron?

Thanks in advance.

Changed in compiz:
assignee: nobody → sourcercito
status: New → Incomplete
Revision history for this message
thib (thib) wrote :

Hello,

I could reproduce the bug by reproducing the steps described by LKRaider on the latest live cd (daily - 2008/04/19).
However I was unable to reproduce the bug that makes any window opens in background (ie launch 'nautilus' by a shell, the focus will be kept by the shell's window).

Revision history for this message
Percy Leonhardt (p3y) wrote :

Hi,

what is the current state of this ticket? I am confused that it is only marked as a wishlist because I am effected by this bug every day in Hardy with active compiz.

Am I the only one experiencing this bug, are there any further information needed or is there even some kind of workaround?

Revision history for this message
Travis Watkins (amaranth) wrote :

It is marked as wishlist because it works that way by design and it is a feature request to have an option to change this.

Changed in metacity:
importance: Undecided → Wishlist
status: New → Confirmed
Changed in compiz:
assignee: sourcercito → nobody
status: Incomplete → Confirmed
Revision history for this message
Marnanel Thurman (marnanel) wrote :

Does this happen in metacity?

Revision history for this message
Travis Watkins (amaranth) wrote :
Revision history for this message
Marnanel Thurman (marnanel) wrote :

Travis: are you sure comment 5 is the same thing? I don't think you can have multiple Totem windows open at once. I took it to mean

1. open Nautilus (in window N1) and launch a video file
2. Totem (in a new window T1) gains focus
3. Go back to N1 and launch another video file
4. Video opens in T1, replacing the old video, but does not gain focus

which is behaviour according to spec. This would only be the same bug as reported if it meant

1. open Nautilus (in window N1) and launch a video file
2. Totem (in a new window T1) gains focus
3. Go back to N1 and launch another video file
4. Video opens in a new window T2 but does not gain focus

Revision history for this message
Percy Leonhardt (p3y) wrote : Re: [Bug 129396] Re: new windows are put in the background

Am Sonntag, den 13.07.2008, 23:11 +0000 schrieb Thomas Thurman:
> which is behaviour according to spec. This would only be the same bug
> as reported if it meant
>
> 1. open Nautilus (in window N1) and launch a video file
> 2. Totem (in a new window T1) gains focus
> 3. Go back to N1 and launch another video file
> 4. Video opens in a new window T2 but does not gain focus
>

This is the bug I am getting with Compiz but not Metacity:

Precondition: Set up Firefox to open a new link in a new window instead
of a new tab (using the Preferred Applications Dialog)
1.) Open Evolution
2.) Click on a link in an e-mail
3.) Firefox opens with the link and comes into front/focus.
4.) Switch back to Evolution and select another link
5.) A new Firefox window opens with the link but it stays in the back

This only happens with Compiz. When Firefox is set up to open the new
link in a new tab instead it works with Metacity and Compiz. In both
cases Firefox jumps to the front opening the link in the new tab.

Revision history for this message
Marnanel Thurman (marnanel) wrote :

So can I take Metacity off the list for now?

Revision history for this message
Percy Leonhardt (p3y) wrote :

Am Montag, den 14.07.2008, 19:03 +0000 schrieb Thomas Thurman:
> So can I take Metacity off the list for now?

At least for me: Yes.

Changed in metacity:
status: Confirmed → Invalid
Revision history for this message
Moebius (rlukas) wrote :

Had similar issue however I solved my problem by going into compiz settings, general options, focus & raise behaviour tab, then changed focus prevention level to low.

Revision history for this message
Percy Leonhardt (p3y) wrote :

Am Samstag, den 13.09.2008, 05:31 +0000 schrieb Moebius:
> Had similar issue however I solved my problem by going into compiz
> settings, general options, focus & raise behaviour tab, then changed
> focus prevention level to low.

Looking in gconf
at /apps/compiz/general/screen0/options/focus_prevention_level the value
was already set to 1 which means 'low'. I changed it to 0 (off) and it
now also works for me. At least with the described Firefox scenario.

Not sure what side effects this may cause. I will keep an eye on it.

... just found another situation where this workaround is useful:
opening an image from Nautilus with Gimp, then switching back to
Nautilus and open another image with Gimp. Without this workaround the
newly opened window with the image will stay in the background, with it
the image will pop up in front of the Nautilus window.

Thanks for the hint!

Revision history for this message
Phaedrus (camerons-web) wrote :

Could this be upgraded from wishlist? It is quite annoying.

Every new window created from an active window (ie not from a menu or panel button) is started in the background. This include child windows of active apps. This is happening to me now under both Gnome and KDE sessions when using compiz.

Examples:
+ Run gvim (or file-roller, or gnome-about) from gnome-terminal, the new app appears in the background and gnome-terminal retains the focus. Using the app switcher demonstrates that the new app appears in the app-list immediately *before* the gnome-terminal.
+ While running Thunderbird, click reply to an email, and the compose window appears in the background. In this case, the compose window *does* get the focus, and using the app switcher demonstrates that the window manager thinks its the active window.
- Starting a new window with firefox, gnome-terminal *does* work as it should (new window in foreground, with the focus), so the second example could conceivably be thunderbird bug, it didn't show itself back under kwin.

Revision history for this message
Phaedrus (camerons-web) wrote :

Forgot to say: I'm running up-to-date Intrepid, with intrepid-updates.

Also, I just tried switching focus-prevention-level to "Off", and makes things seem to work correctly.
It's a useful workaround, but I'd love to this feature working. Focus prevention is a useful thing, when it works. ;-)

Revision history for this message
Batwam (batwam) wrote :
Revision history for this message
Gok6tm (jay+6) wrote :

i'm using ubuntu 8.10 without compiz and having the a problem like that :
if i open image with gimp from nautilus and if gimp is already open the new image is open in background

similar thing with gedit / geany , ...

with compiz running the tip solve the problem, but without the problem still here.

Is there something to change in gconf metacity ?

Revision history for this message
Alan James (alan-alanjames) wrote :

I have the same problem and so I'm using low focus prevention to work around it. Ideally new windows should open on top but without focus unless they happen to appear under the mouse. I can't seem to do that with the currently available options.

Revision history for this message
Grey Nicholson (greytheearthling) wrote :

I have the *opposite* problem: new windows appear in front of the active window.

I can prevent windows gaining *focus*, by changing Compiz's settings, but I haven't found a way to change where new windows appear in the stacking order.

I'd like new windows never to appear in front of the active window. The only time a new window should appear at the front of the stack is when I've launched it from a panel or a dock, and so the panel or dock is active and not the frontmost window.

summary: - new windows are put in the background
+ New windows are put in the background
Changed in compiz (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
164747 (jacquet-david) wrote :

Workaround presented in https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/129396/comments/17 by Percy fixed it for me.

Example: clicking a link in a maill in Thunderbird now brings up the page in Frefox in the foreground as opposed to in the background which was the case before I changed the focus_prevention_level=0 (before it was=1, which I guess is default).

Maybe the importance=Wichlist is a little low since this in my view makes compiz not really an option for users that are not very enthusistic and forgiving.

Revision history for this message
Travis Watkins (amaranth) wrote :

There are most likely two problems being described here. One is like Thomas said, how the spec says these things should work. The other should be fixed with the compiz PPA for karmic (should be in karmic main soon). When I open a directory of pictures in nautilus and open one an eog window opens in the foreground. When I leave that open but go back to nautilus and open another picture another eog window opens in the foreground again.

Can someone see if they are still having issues when using karmic with the compiz PPA?

https://edge.launchpad.net/~compiz/+archive/ppa

Changed in compiz (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
WeatherGod (ben-v-root) wrote :

This issue has been tested with the latest Karmic using compiz, and there is no notice of any mis-behavior.

Revision history for this message
Travis Watkins (amaranth) wrote :

Alright, I'm going to close this bug as fixed since no one seems to have been able to reproduce the problem since the proposed fix in compiz. If you are still having this problem with Ubuntu 9.10 please reopen the bug.

Changed in compiz (Ubuntu):
importance: Wishlist → Low
status: Incomplete → Fix Released
Revision history for this message
rg (rob-themayfire) wrote :

This is happening again in 10.04, without Compiz running.

Links or web files opened from any app (evolution, terminal, nautilus) open FireFox or Chrome in the background. There seems to be some disagreement about whether that's desirable or not, but many, including myself, want links to open in the foreground. More details here:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/546969

And here's someone reporting the same problem in kubuntu 10.04:
http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=9265170

So it's not Compiz, it's not GNOME, and it's not the source or destination apps. I think that leaves us looking at metacity, no? This behavior is driving me nuts, as I have to manually focus the browser every time I click a link in an email, etc.

Is it appropriate to revive this thread? Or should I post a new bug report?

Revision history for this message
WeatherGod (ben-v-root) wrote :

While it is similar behavior, the fix was sent out for Compiz, not metacity. You might want to open a new report against metacity (although, note that metacity is a gnome thing). Do feel free to mention in the new report that the bug is similar to this report. You might have to phrase the report as a feature request for some sort of user-configurable setting for desired behavior.

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.