Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!sri-unix!rutgers!uwvax!puff!derek From: derek@puff.wisc.edu (Derek Zahn) Newsgroups: comp.sys.amiga Subject: Re: Searching for a workable MENUVERIFY solution Message-ID: <1015@puff.wisc.edu> Date: Tue, 6-Oct-87 11:31:11 EDT Article-I.D.: puff.1015 Posted: Tue Oct 6 11:31:11 1987 Date-Received: Mon, 12-Oct-87 22:42:29 EDT References: <4145@zen.berkeley.edu> Organization: U of Wisconsin CS Dept Lines: 47 Keywords: Intuition, MENUVERIFY, RMBTRAP, Menus, input.device, deadlock In article <4145@zen.berkeley.edu>, bryce@hoser.berkeley.edu (Bryce Nesbitt) writes: > The application he wants is to use position sensitive right mouse button > selects, Deluxe Paint style. > > It would like to be recoded *not* to use verify. > > Set RMBTRAP. > When a RMB message is received, check the position. > If below the Window's Screen's title bar height handle internal. > Else we just screwed up a menu operation!! Unset RMBTRAP then send a > press-relese pair of RMB events to the input.device. > Reset RMBTRAP after the menu is used. > > The theory of operation is ugly, however. Not as ugly as many such things; in fact, it seems rather supported. I have been wondering about this very question recently and have been using (temporariy at least) the following solution. It is also ugly and perhaps not strictly "legal", but it seems to work and it is easy... First, I have MOUSEMOVE set (I need this for something else anyway). Then, the relevant chunk from the IDCMP loop looks something like: case MOUSEMOVE: if(message->IDCMPWindow->WScreen->MouseY > TITLEHEIGHT) { Forbid(); message->IDCMPWindow->Flags |= RMBTRAP; Permit(); } else { Forbid(); message->IDCMPWindow->Flags &= (~RMBTRAP); Permit(); } ReplyMsg(message); break; Actually, I use a state variable to avoid avoidable work, but you get the idea. I am not sure if the Forbid() and Permit() are necessary, but it always seems prudent to use them when messing with system-global structures. If you decide on a "best" solution, please let me know! derek