Focus behavior like in KDE and gnome

Hi,

How can I achieve this ^^ ? I use ClickToFocus, but I want the raised
window -when I click on a Button of FvwmIconMan- to grab the Focus.

And when I iconify the window I want the window in the background (if there is one) to grab the focus. And if there are many windows in the background the next “higher” one should grab Focus.

yosh

There are several ways - I think one is configuring an IconMan pointer action to use ‘EWMHActivateWindowFunc’ but I’m not sure because I’m not currently using IconMan. Any function that applies Focus or a variant.

For the other, I think

FocusStyle * ReleaseFocus

will work for minimizing as well as closing. Not sure how it will work with ClickToFocus, though - I use a kind of sloppy focus.

It doesn’t work. :confused:

From man FvwmIconMan

 *FvwmIconMan: Action     Mouse     2 N sendcommand WarpToWindow

means button 2 on icon calls WrapToWindow. I guess writing

 *FvwmIconMan: Action     Mouse     1 N sendcommand Raise, sendcommand Focus

should work

Well, I want that windows, which are in the back grab the Focus automatically, when I close or Iconify the current window.

Thanks,though

yosh

Then you can try to do something like this

[code]DestroyFunc RaiseFocus
AddToFunc RaiseFocus

  • I Raise
  • I Focus

DestroyFunc MyClose
AddToFunc MyClose

  • I Close
  • I Next (!Transient) RaiseFocus

DestroyFunc MyIconify
AddToFunc MyIconify

  • I Iconify
  • I Next (!Transient) RaiseFocus[/code]
    Add change any Iconify and Close action to MyIconify and MyClose

You may have to add some more conditions to the Next command (like DefaultLayer…) depending of your config.

I have now something like that:

DestroyFunc RaiseFocus
AddToFunc RaiseFocus
+ I Raise
+ I Focus
+ I Iconify off
+ I Iconfiy "False"


DestroyFunc MyIconify
AddToFunc MyIconify
+ I Iconify "True"
+ I Prev (CurrentScreen,CurrentPage) Focus

which works quiete good withe some CirculateSkip Styles, but sometimes a window which ins’t the “highest” one grabs Focus and I don’t know how to handle this.

try something like

Prev (CurrentScreen, CurrentPage, Raised) Foo
TestRc (NoMatch) Prev (CurrentPage, CurrentScreen) Foo

The problem is that my Prev window in the list or ring (it’s the same thing with the Next command) is not always the last selected window.

And I think that the first condition “Raised” is never true because only the
window which has focus is raised, and when I close it there is no window which fvwm declares as raised (another possibility is that the previous window in the ring has a higher priority).

So always the Prev window in the ring grabs focus which isn’t always raised
in a visual sense.

So yoshimo… did you solve that problem ? :wink:
Because I’ve got exactly the same trouble to make Fvwm behave like Gnome or KDE :slight_smile:

Except that it is, of course. Where you are getting anomolies, it’s
likely you have a style option of CirculateSkip for some windows. You can
negate this, by using:

Next (CirculateHit, ....) foo

Higher priority? In what sense? Are you sure rather than using Raise,
you aren’t perhaps wanting to use Visible? Indeed, you might also want to
look at the Direction and ScanForWindow commands.

– Thomas Adam

This is what Dominic Vogt suggested to similar question (not exactly what you want, but maybe close?) using the Direction method Thomas mentioned.

*FvwmEvent-FocusNext: Cmd
*FvwmEvent-FocusNext: destroy_window ClosestWindowFunc

AddToFunc ClosestWindowFunc
+ I Direction Center (CurrentDesk) Focus

AddToFunc StartFunction
+ I FvwmEvent FvwmEvent-FocusNext