I am having some trouble with a set of windows that just wont’ seem to release focus. I have FVWMEvent listening for a destroy event - at which point I want focus to go to window Foo, but when window A is destroyed, A keeps focus!
I have tried using:
[code]
AddToFunc FuncDestroyEvent
I Next (“Foo”, !Focused) Function FuncFocus
I Exec exec xmessage “$[w.name] has focus”
AddToFunc FuncFocus
I Focus[/code]
in my window_dstroy event hadler to try and get focus onto to Foo, but with no luck - this window A has somehow convinced FVWM that it still has focus, when it no longer exisits - how is something like this possible? And more so, is there anyway I can ‘force’ the focus onto another window? Or steal the focus off of window X? I am seriously stumped… my xmessage keeps telling me the window X still has focus…
The only way that I can find to get the focus to my Foo window is to Alt_Tab to it - but I shouldn’t have to do that, right? I just want to have a function that says when window X closes, pass the focus off to Foo… sheesh
Any help would be greatly appreciated
thanks in advance,
Skender
If Window A is destroyed, it can’t have the focus — it will (hopefully) have been unmapped.
I’d use:
+ I Next ("Foo", CurrentPage, AcceptsFocus, !Focused) FlipFocus
(Assuming you mean for the window on the current page).
Presumably “window_dstroy” function was a typo in here, and not in your config? Note that it’s destroy_window that’s the actual event FvwmEvent will understand in your config.
You can’t enforce a client to receive focus if it isn’t setup to receive that event. The use of ‘‘Flipfocus’’ via the Next command will ensure a window that will focus, does so within the ring stack.