This happens also to me often with various applications, but not only when focused from dock, also when a window automatically loads in foreground, but focus remains on the previous one seen.
Some examples and screenshots : I run a program, ie Firefox, in a maximized window, triangle in the right side of Unity dock, which indicates the focused application, is well put on Firefox icon. If, just before switching to Firefox, I've run Update Manager or Synaptic to download some packages, manually switched to Firefox, at the time downloads (or update verification) are finished and packages begin to install (or if there is a partial update available), Synaptic (or Update Manager) comes himself in foreground (without I click on its icon). But the right triangle remains on Firefox icon. So, a click on Firefox icon to go back on Firefox does not do anything, as default behavior in Unity, when an application is selected, is that click on its icon does nothing. So I have to manually click somewhere in the Synaptic window (to focus Synaptic) or to an icon other than Firefox to select this program, and again click to Firefox icon to come back to Firefox ! Other problem, global menu is the one from Firefox, and if I click on the left"X" icon to close Synaptic, it's Firefox which closes as it is focused... Another example : Same thing if I have Firefox reduced, Gwibber maximized. If I click on a link in a tweet, Firefox reappears automatically maximized in foreground, but triangle on Unity dock remains on Gwibber, same problems of selecting / focusing / global menu / closing... ** Attachment added: "Unity-Focus-FF-UM.png" https://bugs.launchpad.net/unity/+bug/813714/+attachment/2236335/+files/Unity-Focus-FF-UM.png -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/813714 Title: Unity places the wrong window to the foreground when focused from dock To manage notifications about this bug go to: https://bugs.launchpad.net/unity/+bug/813714/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs