Newsgroups: comp.sys.atari.st.tech
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!ox.com!math.fu-berlin.de!fauern!faui43.informatik.uni-erlangen.de!csbrod
From: csbrod@immd4.informatik.uni-erlangen.de (Claus Brod)
Subject: Re: Windows and Events Questions
Message-ID: <1991Apr22.154354.16919@informatik.uni-erlangen.de>
Organization: CSD., University of Erlangen, Germany
References: <1991Apr22.072944.1120@jato.jpl.nasa.gov>
Date: Mon, 22 Apr 1991 15:43:54 GMT
Lines: 29

vsnyder@jato.jpl.nasa.gov (Van Snyder) writes:
>How can one wait for left OR right mouse button with Event<...>?
>EventButton and EventMultiple wait for left AND right mouse button down
>if the mask and button arguments are both 3.

A method that works with all GEM versions so far is the following:
Set bit 8 in the evnt_button mclicks parameter. This negates the
event condition in the mclicks, mmask and mstate parameters. To
wait for left OR right button, use the following evnt_button
call:
	mclicks = 1 | 256;
	mmask = 3;
	mstate = 0;
	evnt_button(mclicks, mmask, mstate);

This instructs the AES to come back with a mouse click event when
the two mouse buttons are NOT both released, in other words, when
one of the mouse buttons is pressed.

This method works reliably and is currently being tested at Atari.
I hope they will finally document it and relieve us from mixing
AES and VDI calls to poll the mouse states.

----------------------------------------------------------------------
Claus Brod, Am Felsenkeller 2,			Things. Take. Time.
D-8772 Marktheidenfeld, West Germany		(Piet Hein)
csbrod@medusa.informatik.uni-erlangen.de
Claus Brod@wue.maus.de
----------------------------------------------------------------------
