FVWM: can't figure out how to refocus

From: Stephen C. Koehler <koehler_at_securecomputing.com>
Date: Tue, 16 Mar 1999 09:08:36 -0600

I'm having trouble figuring out how to use the Current/None/Next commands
to implement a smart refocus to a window on the current page.

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. 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.

I started out with a Refocus command that I slap on the front of any call
to Iconfiy or Scroll:

    AddToFunc NextFocus
    + "I" Next (!Iconic CurrentPage) WarpToWindow 10 10

    AddToFunc Refocus
    + "I" $0 $1 $2 $3 $4 $5 $6 $7 $8 $9
    + "I" <call NextFocus under the right conditions>

NextFocus properly selects a non-iconic window on the current page. I
only want to call it at the proper times, which is when there isn't already
a window on the current page that has focus.

What I want to do is

    + "I" Current (!CurrentPage) NextFocus

However, CurrentPage is not negatable. If I try

    + "I" None (Visible CurrentPage) NextFocus

I don't refocus if there are any visible windows on the current page.

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

Can anyone suggest a solution to this problem?
-- 
Steve Koehler               
Secure Computing Corporation
koehler_at_securecomputing.com 
--
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 Tue Mar 16 1999 - 09:09:50 GMT

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