Re: FVWM: can't figure out how to refocus

From: Tim Phipps <tim_at_quadrics.com>
Date: Thu, 18 Mar 1999 17:16:21 +0000

"Stephen C. Koehler" wrote:
>
> Here's the problem. I have Iconify and Scroll bound to keys. When I
> iconify a window, I want the next reasonable window on the current page
> to get focus.

This is fairly straight forward

AddToFunc my_iconify I Iconify on
+ I Prev (CurrentPage !Iconic) FlipFocus

> Likewise, when I scroll to a different page, if the cursor
> is not over a window on that new page, I want the next reasonable window
> on the current page to get focus. I'm having trouble getting both these
> to work at once. One persistent problem is that I don't want the focus to
> change when it is already good, for example if I attempt to scroll off the
> edge of my desktop, I don't want focus to change.

This is tough. I don't know of a way of telling that there isn't a
currently focussed window.

> What I want to do is
>
> + "I" Current (!CurrentPage) NextFocus
>
> However, CurrentPage is not negatable. If I try
>
> + "I" None (Visible CurrentPage) NextFocus
>
Have you tried "Current (!Visible)"?

> I have also tried experiments with conditions that use the current window
> number ($w), but I haven't gotten them to work, either.

This might be very convoluted but $w is zero if there isn't a focussed
window so you might be able to do something like

+ I PipeRead <script> $w

and have a script that prints out "NextFocus" if arg1 is 0

> Can anyone suggest a solution to this problem?

You're not the first person to ask for a !CurrentPage test. If you get
stuck enter a bug report (with a patch please).

Cheers,
Tim.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Thu Mar 18 1999 - 11:17:46 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:02 BST