Hi,
following problem:
I want to switch to another page and the window which is in the foreground should get the focus.
But my function]DestroyFunc FuncGotoPage
AddToFunc FuncGotoPage
- I GotoPage $0 $1
- I ThisWindow (CurrentPage, Raised, !Focused) Focus[/code]doesn’t work
what’s wrong?
Thomas
You’re doing it wrong. I can’t tell if you want something like the following or not:
DestroyModuleConfig FE:*
*FE: new_page foo
*FE: new_desk foo
AddToFunc StartFunction I Module FvwmEvent FE
DestroyFunc Foo
AddToFunc Foo
+ I None (CirculateHit, CurrentPage, Focused) Next (AcceptsFocus) Focus
If this isn’t what you meant, what do you mean?
– Thomas Adam
For example: I am working on a window foo in page 2. Now I want switch to page 3 with e.g the cursor right and the focus should follow to page 3 and the window bla which is raised (fully visible, not overlapped with other windows) should get the focus.
Unfortunately your example doesn’t work as I want - the raised window won’t get the focus.
With[code]
- I None (CirculateHit, CurrentPage, Focused, Raised) Next (AcceptsFocus) Focus
[/code]also
Because the None conditional implies what’s run with the Next command, so you would have to do:
+ I None (CirculateHit, CurrentPage, Focused, Raised) Next (AcceptsFocus, CurrentPage, Raised, ...) Focus
– Thomas Adam
Hi Thomas,
I’ve found the solution]DestroyFunc FuncGotoPage
AddToFunc FuncGotoPage
- I GotoPage $0 $1
- I Next (CurrentPage, !Iconic, !Sticky, !Shaded, !Focused, !Overlapped) Focus[/code]This works in most cases except if windows not overlapping. Then the next matching window in the ring will be focused. But that’s ok (at the moment )
Thanks for helping,
Thomas