On Wed, Jun 18, 2003 at 07:07:40AM -0400, Rouben Rostamian wrote:
> Dominik Vogt <fvwm_at_fvwm.org> wrote:
> > On Tue, Jun 17, 2003 at 11:35:31PM -0400, Rouben Rostamian wrote:
> > > I am hitting a mental block in reading the section of the fvwm man
> > > page on Conditional Commands.
> > >
> > > We read:
> > >
> > > Next [(conditions)] command
> > > Performs command (typically Focus) on the
> > > next window which satisfies all conditions.
> > >
> > > Prev [(conditions)] command
> > > Performs command (typically Focus) on the
> > > previous window which satisfies all conditions.
> > >
> > > My question is: when should I use Next and when should I use Prev
> > > in a script?
> > >
> > > For instance, let's consider the following example from the man page:
> > >
> > > AddToFunc MailFunction
> > > + I Next ($0) Iconify off
> > > + I Next (AcceptsFocus, $0) focus
> > > + I None ($0) Exec exec $0 $1
> > >
> > > Why is Next used here? Why not Prev? What's the difference?
> >
> > Windows are stored in a ring internally. Think of the focused
> > window as a cursor on the current position in the ring. Next
> > searches forwards through the ring for a matching window, and Prev
> > searches backwards. The windows in the ring are either ordered by
> > creation time or by the last time they had the focus (depending on
> > the focus policy).
> >
> > In this specific case there is no noteworthy difference between
> > Next and Prev because there are either zero or one windows of the
> > given type. We use Next in such examples out of habit and because
> > Prev might be a bit confusing.
>
> Thanks, Dominik, for this very clear explanation. Shouldn't this
> be in the man page?
Done.
> Now that you are at it, would you also elaborate on your parenthetical
> remark "(depending on the focus policy)"? Is there an easy way to
> explain how the focus policy determines the order in the ring?
SloppyFocus and ClickToFocus order the ring in last-focus-order,
the other policies use creation-order.
Bye
Dominik ^_^ ^_^
--
Dominik Vogt, dominik.vogt_at_gmx.de
Reply-To: dominik.vogt_at_gmx.de
--
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 Jun 19 2003 - 11:43:47 BST