[comp.sys.sgi] popup menus on left-mouse

hultquis@wk43..nas.nasa.gov (Jeff P. M. Hultquist) (03/09/90)

I would like to create a popup menu which appears
when the user pushes the LEFT mouse button.  This
code ...

	dev = qread(&val);
	if ((dev == LEFTMOUSE) &&
	    (val == 1) {
	    item = dopup(menu);
	}

... brings the menu up just fine, but the system 
waits for the release of the right button.  How
can I tell the system to watch the left button?

Thanks.  Please send mail, I will summarize.

--
Jeff Hultquist				hultquis@nas.nasa.gov
NASA - Ames Research Center		(415) 609-4970
Disclaimer:  "I am not a rocket scientist."

dan@meritaus.UUCP (Daniel Haug) (03/09/90)

From article <5141@amelia.nas.nasa.gov>, by hultquis@wk43..nas.nasa.gov (Jeff P. M. Hultquist):
> I would like to create a popup menu which appears
> when the user pushes the LEFT mouse button.  This
> code ...
> 
> 
> ... brings the menu up just fine, but the system 
> waits for the release of the right button.  How
> can I tell the system to watch the left button?
> 
> Jeff Hultquist				hultquis@nas.nasa.gov
> NASA - Ames Research Center		(415) 609-4970
> Disclaimer:  "I am not a rocket scientist."

I spent a little time researching this, and didn't come up with any
good solutions.  The problem is that the pop-up menu is based on the
4Sight (NeWS) menu class LitePullRightMenu, which is based on LiteMenu,
etc.  This menu substrate has low-level code that uses the binding
of MenuButton for menu selection.  By default, MenuButton is the
right mouse button (look in /usr/NeWS/lib/NeWS/init.ps).
So, as far as I can tell, you can probably rebind MenuButton to be the
left button by changing this.  However, looks like you'd impact all
menus.

Despite my best attempts (and limited time), I can't figure out if
there is a Lite method that can be overriden to solve this.
-- 
dan haug
Merit Technology, Inc.
====================================================================
Phonenet: (512)338-2450
Internet: execu!sequoia!meritaus!dan@cs.utexas.edu
    UUCP: {uunet, cs.utexas.edu!execu, texbell}!sequoia!meritaus!dan