Active windows lose focus to desktop randomly and when show desktop command is run even when they're still active

Bug #848115 reported by Guruprasad
140
This bug affects 37 people
Affects Status Importance Assigned to Milestone
Unity
Expired
Undecided
Unassigned
unity (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Active windows randomly lose focus to desktop though they are on top and active. This renders them frozen and unusable. Focus returns after some time automatically. This happens with show desktop command too.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: unity 4.14.2-0ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-11.17-generic 3.0.4
Uname: Linux 3.0.0-11-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 1.22.1-0ubuntu2
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,decor,mousepoll,vpswitch,regex,animation,snap,expo,move,compiztoolbox,place,grid,imgpng,gnomecompat,wall,ezoom,workarounds,resize,fade,unitymtgrabhandles,scale,session,unityshell]
Date: Mon Sep 12 23:10:54 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110901)
ProcEnviron:
 LANGUAGE=en_IN:en
 PATH=(custom, no user)
 LANG=en_IN
 SHELL=/bin/bash
SourcePackage: unity
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Guruprasad (lgp171188) wrote :
Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
Guruprasad (lgp171188) wrote :

Suggesting that this issue's importance be set to high, because working in the desktop environment becomes impossible with focus shifting randomly and unexpectedly to other windows or to desktop when there are active windows that we are working with.

Changed in unity (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Guruprasad (lgp171188) wrote :

Hi, what more information regarding this bug is needed to make it complete?

Revision history for this message
sergio (serge-simon) wrote :

Same problem (quite annoying) for me in Ubuntu 11.10 under Unity. Affects from time to time the "ALT+TAB" behavior (the functionnality still works, but the ALT+TAB window is in the background instead of "on top" of the other windows).

Bilal Shahid (s9iper1)
Changed in unity:
status: New → Incomplete
Revision history for this message
Bilal Shahid (s9iper1) wrote :

can you please attach a vedio of the bug with the latest updated oneiric,here i am not be able to reproduce this bug.
thankx.

Revision history for this message
Geoff Teale (tealeg) wrote :

I am no longer seeing this bug since I did a clean install of the release version of oneiric.

Revision history for this message
David Gómez (dabisu) wrote :

Why do you mark this bug as incomplete? It affects 17 people...

Ubuntu 11.10/Unity 3D here. Windows losing focus all the time. Actually while writing this text, i switched workspaces and lose chrome focus :(. Specially switching workspaces seems to be a problem. And just clicking again on the terminal or chrome doesn't restore focus to the window, i have to minimize/maximize the window to be able to use it again...

Revision history for this message
David Gómez (dabisu) wrote :

Since previous comments suggests that it's not present in a clean install of oneiric, maybe it's caused by a compiz setting not enabled in the default oneric installation.

Revision history for this message
Omer Akram (om26er) wrote :

David, you might want to try with unity --reset or maybe test in a guest session where settings are clean. A few steps to reproduce the issue would be really helpful.

Revision history for this message
David Gómez (dabisu) wrote :

Omer, thank you. Resetting unity seems to solve the focus lost problem. Now i'm enabling one by one the compiz settings i had before to see if any of them triggers the problem again.

Shouldn't this "unity --reset" command be executed at upgrade time? Compiz settings are lost, yes, but it's worst to have a unusable desktop with windows losing focus...

Revision history for this message
Jason Tackaberry (tack) wrote :

This bug is plaguing me very regularly in 11.10 on my laptop (Thinkpad T510). What's interesting is that it doesn't happen on my desktop PC, also running 11.10. Regardless, I suspect it's going to drive me to xfce, because it makes the desktop unusable. So far I haven't had a window lose focus while I was typing in it. Rather, for me happens frequently when unlocking the desktop, or switching between workspaces.

I can reproduce this problem consistently by having a workspace full of gnome-terminals, another workspace with Firefox, and then switching from the terminals workspace to Firefox. (I use a switch-to-workspace-<N> keyboard shortcut, but I've seen it with expose switching as well.) After switching, Firefox always loses focus, and I must click the desktop and click back to Firefox (or minimize/restore, or shade/unshade) to get focus back in Firefox. When I switch back to the terminals workspace, gnome-terminal has focus ok.

unity --reset did not fix the issue for me, but then after --reset I also restored the functionality I need, which is: sloppy focus (autoraise disabled), 6x1 virtual workspaces (with keybindings ctrl-alt-[1234qw]), set the keybinding on the scale plugin to ctrl-alt-r (toggle mode disabled).

At first I suspected sloppy focus, but even after returning to click-to-focus, the problem persists.

Revision history for this message
Jason Tackaberry (tack) wrote :

Out of desperation I did a format/reinstall. This problem does not exist out of the box. While reconfiguring the system to my tastes, I kept my eye on if/when it would reappear.

One aspect of my configuration is that I have a sandbox user that I run the browser out of, along with other potentially dangerous network applications, which is part of my active desktop session as my main user. I use(d) the avant-window-navigator as a launcher for the sandbox user.

Once avant-window-navigator was running, the focus problem returned in full force. I "fixed" this by starting the sandbox session into gnome-terminal instead, and launching things from the command line (which I tended to use more anyway). I don't know if the problem was AWN, or just some very unhappy interaction between two panels running at the same time. In any case, AWN is not running and the problem has not returned.

Hopefully this is helpful to others who ran into this very frustrating problem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for unity (Ubuntu) because there has been no activity for 60 days.]

Changed in unity (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for unity because there has been no activity for 60 days.]

Changed in unity:
status: Incomplete → Expired
Revision history for this message
Vladimir Rutsky (rutsky-vladimir) wrote :

I'm using Ubuntu 13.10 and once I noticed behaviour described in comment #4: alt-tab works, but it's window is behind other windows --- I can see it if I do alt-tab on workspace without windows. Also, such bug once occured on computer of my friend.

HUD dialogs (raised by pressing "alt" or "super" key) in background too.

Revision history for this message
Vladimir Rutsky (rutsky-vladimir) wrote :

I found post about same behaviour (Unity windows in background) in Ubuntu 12.10: http://askubuntu.com/questions/209518/unity-and-dash-displayed-under-all-active-windows

In my case "unity --replace" (temporarily?) fixed problem.

Revision history for this message
Gilmar Leitão (gilmatryx) wrote :

I am facing the same problem using my laptop connected to another monitor (ubuntu version 14.10).

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.