20

I'm running Ubuntu 9.04 and I have the window manager configured for "focus follows mouse" but new application windows will steal the focus. Seems like there are many threads out there complaining about this behavior, but I see no solutions, am I missing something?

3 Answers 3

7

My best solution for this so far is to install Compiz and within it take the following actions: select "General Options" from the top of the first window, open the "Focus & Raise Behaviour" tab, select "Very High" from the "Focus Prevention Level" dropdown, and enter "any" in the "Focus Prevention Windows" text box.

I'm getting used to the fact that I need to visually scan the applications at the bottom of the window on a regular basis and it produces some odd behaviors such as applications which previously had focus but then yield it to other applications after a dialog has been completed.

Still looking for better solutions for this, and I expect that I could get better behavior by tweaking the settings in Compiz, but I'm too busy for this.

2
  • did you found a workaround? I was thinking, there is a opacity mod at ccsm that if we put all windows at like 95% (slightly transparent), we would know when another window pops up (just below the focused window) and would be less troubling that dont knowing it spawned.. still have to try it tho... may be annoying also.. Jun 18, 2014 at 4:00
  • at ccsm "opacity,brightness and saturation" add a opacity rule with 95 value (set the value first) and type "any" without quotes on the window matcher, it works perfectly to know a window spawned behind the current one! :) Jun 18, 2014 at 22:34
5

It's funny that I found the solution for my Ubuntu and GNOME on OpenSolaris FAQ:

The solution is to start:

gconftool-2 -s -t string /apps/metacity/general/focus_new_windows "strict"

or, alternatively you can start gconf-editor and fix /apps/metacity/general/focus_new_windows to "strict"

1
  • 1
    The description of that property under cinnamon (org.cinnamon.desktop.wm.preferences) is: "This option provides additional control over how newly created windows get focus. It has two possible values; "smart" applies the user's normal focus mode, and "strict" results in windows started from a terminal not being given focus." Jul 13, 2017 at 22:00
3

That didn't work for me in Ubuntu 16.04. Nor did adjusting Desktop>wm>preferences>auto-raise via the dconf Editor.

What does work is making sure you have the compizconfig-settings-manager installed. Then (I don't know of a way to reach that advanced utility via the UI), you can run the command from a Terminal: ccsm

Then you click on the General options and in there, click on the Focus & Raise Behaviour tab. You need to change the Focus Prevention Level from Low to Normal (at least).

(Workrave started driving me mad when something recently changed and it started stealing focus while I was writing and not looking at the screen!)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .