Re: FVWM: Action(mouseX)

From: Cristian Tibirna <ctibirna_at_gch.ulaval.ca>
Date: Fri, 25 Jul 1997 13:20:49 -0400

Adam Kopacz writes:
> Hi,
>
> thanx. it works :) but i have a little problem:
>
> (2x1, Icon mini-exp.xpm, Title(Side) Menue, Action(mouse1) 'PopUp
> Main-Menu', Action(mouse2) Nop, Action(mouse3) 'WindowList')
>
> when i click my 'menu' with the left button then i see it and i don't
> need to take my finge raway from the left mpouse button :)
> but when i click with the 3th button that i need to 'unklick' (sorry my
> bad englisch) to see the window list.. i see the same when i make a
> funktion that open a menu and start it from fvwmbuttons..
>
> --

Hi

For menus the response is simple (? :-) read away the *simple* thing for 5 minutes):

Version 1.
PopUp SomeMenu

is a fvwm valid action which, if linked to a mouse button, occurs on
the MouseButtonXDown event. The menu will be deleted at the consecutive
MouseButtonXUp event ONLY if this last event occurs with the mouse
pointer out of the menu. If not, another click/unclick is needed for
the menu to disappear. With other words:

click: the menu pops up
consecutive unclick: the menu stays there
click anywhere, even on the menu: nothing happens, the menu is still
there
consecutive unclick, even on the menu: the menu goes away

CONTRARY:

click: the menu appears
drag the mouse out of the menu: the menu stays there
consecutive unclick out of the menu: the menu goes away


Version 2.
Menu SomeMenu

is another fvwm valid action which, if bound to a mouse button,
occurs on the MouseButtonXUp event, and only an operation on the by
now onscreen-present menu or another MouseButtonXUp event will delete
it.

For the WindowList, I can observe that, when simply bound to the
Mouse 3 on the root window (the default config found in
system.fvwm2rc), it acts like if a PopUp would have been implemented
for this built-in menu.

But when bound to a button from the fvwmbuttons bar, it acts like if a
Menu would have been called. I suspect (I didn't read the code in
FvwmButtons) that Action command verifies if the next thing is a PopUp
command, and gives the control at the MouseButtonXDown if yes. If not,
it waits for the mouse button to be released, and after that it
executes whatever is given.

This is another sign of inconsequence in the code of FvwmButtons,
which is, for me, the first candidate to a complete rewrite. I was
hoping, for a year, by now, to find the time to do it. No chance :-]

As a conclusion, for the moment, Adam, you're lost. Nothing to do
(with the actual version, I mean without a fatty patch) for solving
your problem. Call simply the WindowList from anyway but not from
fvwmbuttons or menus (and there's not so much left :-).

In this specific situation, I think an organized way of doing would be
to have FvwmButtons rewritten to accept:

Action(Mouse <number> <event>)

where:
<number> would be 1 to how many buttons you have (much means better)
<action> would be: In, Out (have anybody missed the ubiquous yellow
                                hints? )
                   Down, Up (obvious)
                   DoubleClick, TripleClick (also)
                   DragIn, Drag Out ( :-) reserved for further
                        enhancements, and documented a la M$ :-)

This would not be too much, huh?

Hey, another half'n'hour of bla-bla. I would have to go through to the
finish on the code, in this time ;-)

                                Friendly, Cristian
--
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 Fri Jul 25 1997 - 12:20:39 BST

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