Re: FVWM: Focus problem / Mail hotkey

From: Tim Phipps <tim_at_quadrics.com>
Date: Thu, 12 Nov 1998 17:50:29 +0000

Ives Aerts wrote:
> Is there a good explanation somewhere about
> the windowlist and how the focussing of windows is influenced by the
> various commands?
'fraid not. There is the source.

My understanding is that there is a list that fvwm builds. When windows
are created they are added to the end of the list. Fvwm also maintains
a pointer to the window which has the focus called the current window.
The Next command starts at the current window and works its way down the
list until it finds a window which matches it's list of conditions. It
then sets another pointer (Scr->tmp) to this window and calls the
function in it's argument. Prev is the same but it works back up the
list. Both commands wrap around the top and bottom and stop if they get
back to the current window. The None command starts at the current
window and stops if it finds a match for its conditions, it only
executes its function if it gets back to the current window.

The fact that Next/Prev start at the current window but set Scr->tmp
explains why you can't do Next, Next, Next to go three windows around
the windowlist since each Next starts at the same point.

If you change the focus with the mouse the newly focussed window is
moved to the end of the list and the current window pointer is
updated. The Focus command just moves the current window pointer. Prev
Focus and Next Focus do not alter the windowlist order but moving focus
with the mouse does. FlipFocus moves the focus in the same way as
changing the Focus with the mouse i.e. it puts the target window to the
end of the windowlist and updates the current window.

>
> > This is where None comes into its own:
> >
> > # function to toggle iconic state of Mutt window
> > AddToFunc ToggleMail "I" Next [Mutt !Iconic] HideMutt
> > + "I" None [Mutt !Iconic] ShowMutt
>
> This still doesn't work. It does pop up the window (or indeed start it
> if it's not there yet) but instead of hiding it, it will hide it and
> then pop it up again. Seems like the first line changes the windowlist
> so that the second one is always executed.
> So I'm still stuck with two keys:

Umm, looks like HideMutt is changing the Iconic state of Mutt before the
None conditions are evaluated. Try the following:

AddToFunc ToggleMutt "I" Next [Mutt] Iconify
+ "I" None [Mutt !Iconic] Prev [CurrentDesk !Iconic]
Focus
+ "I" None [Mutt] exec mutt
+ "I" None [Mutt] Wait Mutt
+ "I" Next [Mutt !Iconic] Focus

Cheers,
Tim.
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu Nov 12 1998 - 11:51:53 GMT

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