Subject: -Meta_L

From: Jason Weber <[email-masked]>
Date: Thu, 1 Jul 2004 02:10:39 -0700

It looks like key release bindings are gone.  Is there a workaround to get this
or does anyone have a suggestion on how I can fix this?

If the focus isn't on a proxy, will FvwmProxy get any alternate indication
of the alt release?  I don't suppose the event will hit an X KeyPress.

-- 
  _
 ( \      _  \    /_ /  _ _  Jason Weber                  Oceanside, CA
  \|(\/)()))  \/\/(-/_)(-/(  http://www.imonk.com/baboon  [email-masked]
  //                                                      [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: Dominik Vogt <[email-masked]>
Date: Fri, 2 Jul 2004 03:31:12 +0200

> or does anyone have a suggestion on how I can fix this?

I wish I knew a good way to do this.  Key release bindings froze
fvwm or FvwmProxy too often to be usefull (e.g. if you opened a
menu with the key held down and released it before closing the
menu).  So I removed the code again.

I really like the flexibility of remote controlling FvwmProxy via
"SendToModule", but it doesn't work on key release.  It's
virtually impossible to guarantee no key realeas events are lost
unless the keyboard is grabbed, but then either fvwm or FvwmProxy
grabs it and the other will freeze (well, if FvwmProxy is remote
controlled, it does not need keyboard input, but then we still
have to prevent fvwm from running arbitrary functions).

One solution might be to let fvwm pass a keycode to FvwmProxy.
The module could actively watch the state of the key and close if
it has been released.  To keep the code simple, we could allow
just modifiers (which are easier to watch).

> If the focus isn't on a proxy, will FvwmProxy get any alternate
> indication of the alt release?

Not from fvwm.  

> I don't suppose the event will hit an X KeyPress.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]

---

From: Jason Weber <[email-masked]>
Date: Fri, 2 Jul 2004 01:31:12 -0700

I used XQueryPointer in the prototype.  If there's no objection,
I can just put something similar back in.

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 2 Jul 2004 14:05:03 +0200

> I can just put something similar back in.

I have no objections, but we need to add some protocol to inform
FvwmProxy about which modifiers to watch.  Perhaps something like

  SendToModule FvwmProxy Show ReleaseModifiers <modifiers> <action>

where <modifiers> is a modifier string as in the Mouse command (I
think there is some parsing stuff in libs/Bindings.c) and <action>
is either "Abort" or "Activate current proxy" (or whatever we
called this functionality).

It would be good to not poll the pointer constantly but only when
a message from fvwm arrives, or once per second otherwise.

Ciao

Dominik ^_^  ^_^

---

From: Jason Weber <[email-masked]>
Date: Sun, 4 Jul 2004 13:22:21 -0700

How about:

.IP "*FvwmProxy: Action ModifierRelease \fIcommand\fP"
This selects an fvwm function to be called while proxies are shown and
any modifier held when the proxies were last activated is later released.
The default is Nop.

*FvwmProxy: Action ModifierRelease SendToModule FvwmProxy Hide

Hmm, maybe I should word that description a little better.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 5 Jul 2004 14:15:45 +0200

> any modifier held when the proxies were last activated is later released.

Yes, that's nice, but we still need another option via
SendToModule to override this setting.  This shouldn't be much
additional work.

Ciao

Dominik ^_^  ^_^

---

From: Jason Weber <[email-masked]>
Date: Mon, 5 Jul 2004 11:43:25 -0700

Maybe I need an example.  Do you mean to deactivate it or change
the command string dynamically?

Do I just expose '*FvwmProxy: Action' as 'SendToModule FvwmProxy Action'
or maybe call it ReplaceAction?

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 6 Jul 2004 11:32:49 +0200

> the command string dynamically?

No, I meant to tell FvwmProxy

 * Which modifier key to watch for
 * If FvwmProxy should be aborted when the key is released or if
   the selected window whould be activated

To change the actions dynamically one whould use a function and
redefine that.  There is no need for configuring the actions via
SendToModule.

> or maybe call it ReplaceAction?

P.S.:  Please write replies below the quoted portions you are
refering to on this list.  It's much easier to understand.

Ciao

Dominik ^_^  ^_^

---

From: Jason Weber <[email-masked]>
Date: Tue, 6 Jul 2004 22:58:11 -0700

>  * Which modifier key to watch for

Can do.

>    the selected window whould be activated

That's what the 'command' does, presumably Hide or Abort.

Going back to your original example, to tag it onto Show, I'd also have to
tag it onto Next, Prev, ShowToggle, and Circulate.  And aside from the
repetition, that gets pretty ugly on Circulate because it auto-appends
" SendToModule FvwmProxy Mark".

Key Tab A M SendToModule FvwmProxy Circulate \
	ScanForWindow East South (CurrentPage !Sticky) <some delimiter?> \
	OnModifierRelease M SendToModule FvwmProxy Hide

If it's not different per each activation method, it seems 
flexible enough to do

*FvwmProxy: Action ModifierRelease M SendToModule FvwmProxy Hide

Otherwise, Circulate gets too messy and I would expect we would have
to force people to use a bunch of functions

AddToFunc CirculateForward
+ I SendToModule FvwmProxy ScanForWindow East South (CurrentPage !Sticky) \
	SendToModule FvwmProxy Mark
+ I SendToModule FvwmProxy OnModifierRelease M SendToModule FvwmProxy Hide

AddToFunc CirculateBackward
+ I SendToModule FvwmProxy ScanForWindow West North (CurrentPage !Sticky) \
	SendToModule FvwmProxy Mark
+ I SendToModule FvwmProxy OnModifierRelease M SendToModule FvwmProxy Hide

AddToFunc MyShowToggle
+ I SendToModule FvwmProxy ShowToggle
+ I SendToModule FvwmProxy OnModifierRelease M SendToModule FvwmProxy Hide

Key Tab     A   M   CirculateForward
Key Tab     A   SM  CirculateBackward
Key Escape  A   M   MyShowToggle

And make OnModifierRelease a one-shot.  And no auto-append.

I don't know.

-- Jason Weber

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 11 Jul 2004 02:46:09 +0200

On Tue, Jul 06, 2004 at 10:58:11PM -0700, Jason Weber wrote:
> Going back to your original example, to tag it onto Show,

> I'd also have to tag it onto Next, Prev, ShowToggle, and
> Circulate.

Why?  You only need to tell FvwmProxy once when it's initially
activated.

Well, I suggest we start with the basics:

 * Add the code to configure the modifier to release via a module
   config line.
 * Add the code to watch for the modifier release and take the
   appropriate action.

Once this is done, we can think more about the fvwm/FvwmProxy
interface.  I assume the picture gets clearer when we have some
code to look at.

> And aside from the

[snip]

Ciao

Dominik ^_^  ^_^