Want focus to go to new windows


New to fvwm, lots of questions, but the question-du-jour has to do with changing focus.
I want focus to change to newly created windows. For example, I create a new xterm, I want focus to go there automatically. If I invoke emacs, I want focus to go to that emacs window automatically.

.fvwm2rc-theses has “Style “*” ClickToFocus”. This seems to work in getting focus to change when I click in a window. Is there a way to keep that in place (I don’t want SloppyFocus or MouseFocus) but have new window creation supercede it?

Thanks !

Normally this behavior is introduced by UrgencyFunc and EWMHActivateWindowFunc in /usr/(local)/share/fvwm/ConfigFvwmDefaults.

Perhaps your config overwrites these functions…

Here two links for better understanding:
How FVWM starts applications
Stock functions changing focus

Hope this helps a little.


Huh, do you think FPGrabFocus / FPGrabFocusTransient style would help?

Try it …

Open FvwmConsole and enter Style * FPGrabFocus Then open a xterm and check if it works.

I stuck “Style * FPGrabFocus” in .fvwm2rc-theme, started a new xterm, put focus on some other window, then tried to go back to the new xterm by simply clicking inside it somewhere. No luck. I tried putting “Style “*” FPGrabFocus” (note the quoting aroung the *), still no luck.

I am able to get this behavior in konsole. Seems to be the default behavior.

You wrote the whole time about .fvwm2rc-theme. Do you use Fvwm-Themes? If so, Fvwm-Themes is very special. Many things are configured differently than in the default/most Fvwm configs.

In every config I used this behaviour isn’t normal. In my current config I have changed only the UrgencyFunc]DestroyFunc UrgencyFunc
AddToFunc UrgencyFunc

  • I Iconify off
  • I Raise[/code]
    Which Fvwm version do you use?

The quoting around * isn’t needed anymore since … I don’t know.