Subject: manpage question

From: Marcin Pawlik <[email-masked]>
Date: Sun, 23 Feb 2003 04:48:44 +0100

In the descriptions of Current, None, Any, Pick, PointerWindow, and
ThisWindow commands there is a part saying "The command (...) implies
the conditions CirculateHit, CirculateHitIcon and CirculateHitShaded".

It looks strange in this context. I don't understand what's the point in
putting this conditions on commands like Pick. I tried if it works as
described (by invoking commands on window with CirculateSkip style) and
I think it does not. Is this an manpage incorrectness?

Regards,

-- 
Marcin Pawlik
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: [email-masked]
Date: Mon, 24 Feb 2003 00:37:30 +0100

On Sun, Feb 23, 2003 at 04:48:44AM +0100, Marcin Pawlik wrote:
> putting this conditions on commands like Pick.

Current, Pick and Pointerwindow imply said conditions because they
have a unique target window, so 'skipping' the window would be
inappropriate.  For example, the user is asked for a window with
Pick and clicks on a shaded xterm.  The expected behaviour is that
Pick takes this window, regardless of any window styles.

The Any and None commands do not need a specific window - they
just need to know wherther there is a window fulfilling the
conditions.

> I tried if it works as

No, the man page is correct.  It works fine with 2.5.5.  What
version did you try?

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Marcin Pawlik <[email-masked]>
Date: Mon, 24 Feb 2003 17:59:10 +0100

On Mon, Feb 24 at 00:37, [email-masked] wrote:
>> It looks strange in this context. I don't understand what's the point
>> in putting this conditions on commands like Pick.
> 
> inappropriate.  For example, the user is asked for a window with Pick
> and clicks on a shaded xterm.  The expected behaviour is that Pick
> takes this window, regardless of any window styles.

So when I say "Pick (cond) foo" it usualy means "do foo on chosen window
if it satisfies cond" but if cond is for example "!CirculateHit" the
meaning is "do foo on chosen window not assuming that CirculateHit is
true"? If so, is there any way to check if window has "!CirculateHit"?

I checked if it works this way, but it is probably even more
complicated.  "Pick (!CirculateHit) Iconify" command iconifies
"CirculateHit" windows and ignores "!CirculateHit" windows. I still
don't understand reasons for this reversed behaviour. 

I also tried "Pick (Maximized !Maximized) Iconify" and it iconifies
windows. Is the "p and not p" true here?. 
But "Pick (!Maximized Maximized) Iconify" does nothing. Is the order
significant, why?

I'm afraid I completely don't understand how it works.

> No, the man page is correct.  It works fine with 2.5.5.  What

Current (Feb 24) CVS.

Regards

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 24 Feb 2003 18:11:40 +0100

> true"? If so, is there any way to check if window has "!CirculateHit"?

Yes, you can simply say

  Pick (CirculateSkip) foo

> don't understand reasons for this reversed behaviour. 

Because if the default was the other way round, users would try to
"Pick" a window and fvwm would do nothing.  That is confusing.

> But "Pick (!Maximized Maximized) Iconify" does nothing. Is the order

The last condition in a list always wins.  This is so you can
override options if need be.  For example:

  AddToFunc foo
  + I Function bar !Maximized Maximize

  AddToFunc bar
  + I Current ($0) $1

You could add any options you like behing the $0 in this example,
and they take precedence over the options from $0.

Bye

Dominik ^_^  ^_^

---

From: Marcin Pawlik <[email-masked]>
Date: Mon, 24 Feb 2003 19:09:15 +0100

On Mon, Feb 24 at 18:11, Dominik Vogt wrote:
>> So when I say "Pick (cond) foo" it usualy means "do foo on chosen
>> window if it satisfies cond" but if cond is for example
>> "!CirculateHit" the meaning is "do foo on chosen window not assuming
>> that CirculateHit is true"? If so, is there any way to check if
>> window has "!CirculateHit"?
> 
> Yes, you can simply say
> 
>   Pick (CirculateSkip) foo

It doesn't work. For example in

Style xterm !CirculateHit
Pick (CirculateSkip) Iconify

the Pick command doesn't iconify xterms. I think it can't. If Pick
command implies CirculateHit, CirculateSkip is allways false. But I
think there should be some way to achieve that.

> "Pick" a window and fvwm would do nothing. That is confusing.

Why? Without assuming that CirculateHit is true, "Pick foo" would do foo
for any window, "Pick (CirculateHit) foo" would do foo for windows with
CirculateHit etc. I think it would be much simpler. What's confusing
here?

> The last condition in a list always wins. This is so you can override
> options if need be.  

So condition "!c c" is equivalent to "c" not "!c and c". I thought it is
ordinary "and list" in which all conditions must be satisfied without
any winning. Probably I missed some manpage description, sorry.

Regards

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 24 Feb 2003 22:01:22 +0000

> Style xterm !CirculateHit

There is no such CirculateHit style option, just [!]CirculateSkip.

> any winning. Probably I missed some manpage description, sorry.

Marcin, you are simply confused by the fact that there are 2 different
CirculateSkip/CirculateHit meanings. One is a Style option that means
a window is skipped (or not) from the Next and other circulation commands.

The second is conditions CirculateSkip/CirculateHit. The CirculateSkip
condition means - respect the CirculateSkip style flag, and the
CirculateHit condition means ignore the CirculateSkip style flag.

I agree, a better name for the condition would be:

  IgnoreCirculateSkip/!IgnoreCirculateSkip

instead of:

  CirculateSkip/!CirculateSkip

Regards,
Mikhael.

---

From: Marcin Pawlik <[email-masked]>
Date: Tue, 25 Feb 2003 00:28:52 +0100

On Mon, Feb 24 at 22:01, Mikhael Goikhman wrote:
>>>> If so, is there any way to check if window has "!CirculateHit"?
>>> 
>>> Yes, you can simply say
>>> 
>>>   Pick (CirculateSkip) foo
>> 

It's not listed in the manual but is present in the code
(style_parse_one_style_option function in style.c) and works as
expected.

> CirculateHit condition means ignore the CirculateSkip style flag.

Now I understand. Thanks.

BTW during my fight with conditions I found a little mistake in the
manual. In the description of None command it says "The Pick command
implies...".

Regards,

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 25 Feb 2003 08:19:36 +0100

> There is no such CirculateHit style option, just [!]CirculateSkip.

There *is* a CirculateHit option.  Before I introduced the '!' to
negate options, this was the negation of CirculateSkip.

> > the Pick command doesn't iconify xterms.

Of course it does not.  That is what you have told it.  When
xterms have CirculateSkip set (= !CirculateHit), and the condition
has CirculateSkip, the window is of course skipped.

> > I think it can't. If Pick

See above.  Use the CirculateSkip condition explicitly.

> > CirculateHit etc.

No, with the CirculateHit *condition* set, Pick matches *all*
windows.  With the CirculateSkip condition, it matchen only those
windows that have the CirculateHit *Style* option set.

> I think it would be much simpler. What's confusing
> > here?
> > 
> CirculateSkip/CirculateHit meanings.

I was just going to say exactly this :-)

> One is a Style option that means

Bye

Dominik ^_^  ^_^

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 25 Feb 2003 08:21:23 +0100

> (style_parse_one_style_option function in style.c) and works as

It *is* listed in the man page.

> manual. In the description of None command it says "The Pick command

Fixed.

Bye

Dominik ^_^  ^_^

---

From: Marcin Pawlik <[email-masked]>
Date: Tue, 25 Feb 2003 18:18:20 +0100

> It *is* listed in the man page.

You're right. I checked in a wrong (old) version and haven't noticed
that because it was consistent with what Mikhael was saying. My fault,
sorry.

And thank you for all the explanations.

Regards,

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 26 Feb 2003 00:43:26 +0000

> negate options, this was the negation of CirculateSkip.

I simply forgot that I had to run 2.4.15, otherwise it core dumps.
Obviously "!CirculateHit" is not correct in 2.4.x, but the equivalent
"CirculateSkip" is.

Regards,
Mikhael.