Ubuntu: Focused window is not in front


Since I upgraded(1) from Ubuntu 15.04 to 15.10 (only recently) I stumbled on a really frustrating bug of gnome: if click on a window, it correctly gets the focus but stays in the background (see screen shot).

Please note that this issue is not related to any particular window or application. It's the whole window manager that screws up!

Screen capture of the strange behaviour

Here, I clicked on the firefox' window, it get the focus --- I can enter keyboard shortcuts for instance --- but the gnome-terminal window sits there ...

If I Alt-Tab, the newly focused window is correctly put in the front.

(1) I've got the exact same issue with a newly installed Ubuntu 15.10 from scratch. Maybe it is related with my configuration (I kept my $HOME).


  • Linux 4.2 on x86_64
  • Ubuntu 15.10
  • gnome-session 3.16.0-1ubuntu2
  • (ask for more)

What can I do to fix it?


Have you checked this out? It's for an older version of Ubuntu (10.04), but the problem seems similar to yours, so it might be worth checking out.

August 19th, 2012 by A Traveller

Re: Windows staying on top Thanks Frogs Hair. Your suggestion has fixed the problem! Here is what I did:-

Press 'Alt + F2' Typed 'gconf-editor' and clicked 'Run'
Expanded 'Apps', then 'Metacity' and the clicked on 'General'
Double-clicked 'raise_on_click' and changed the 'Value' to 'True' by clicking on the button which said 'False' Clicked 'OK' and then closed the Gconf Editor window Voila!

I have read warnings advising against changing the Value to False, but can't remember ever changing it to False. I have played with the location of the maximize, minimize and close buttons but I don't know how the raise-on-click got changed. I did install Ubuntu Tweak recently but don't know if anything I may have changed in that caused the problem.


Thanks to the suggestion of Phrostatus, I ended up opening gconf-editor and something bizarre happened when I played with its keys. When I opened gnome-tweak-tool, it did not display the same configuration as gconf-editor would. It smelled fishy.

The solution, quite radical, was to reset my entire gnome-session configuration.

  1. Back it up!

    mkdir ./.gnome-config.bak/ && mv ./.gnome* ./.gnome-config.bak/ && mv .gconf* ./.gnome-config.bak/ && mv ./.metacity ./.gnome-config.bak/ && mv ./.cache ./.gnome-config.bak/ && mv ./.dbus ./.gnome-config.bak/ && mv ./.dmrc ./.gnome-config.bak/ && mv ./.mission-control ./.gnome-config.bak/ && mv ./.thumbnails ./.gnome-config.bak/   && mv ~/.config/dconf/* ./.gnome-config.bak/  
  2. Kill it with fire!

    rm -rf .gnome .gnome2 .gconf .gconfd .metacity .cache .dbus .dmrc .mission-control .thumbnails ~/.config/dconf/user ~.compiz*  
  3. Close and reopen you session...

  4. Enjoy!

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »