Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!lll-winken!ubvax!mitsumi!jimm From: jimm@mitsumi.UUCP (Jim Mackraz) Newsgroups: comp.sys.amiga Subject: Re: Searching for a workable MENUVERIFY solution Message-ID: <432@mitsumi.UUCP> Date: Tue, 6-Oct-87 13:57:29 EDT Article-I.D.: mitsumi.432 Posted: Tue Oct 6 13:57:29 1987 Date-Received: Sat, 10-Oct-87 18:27:24 EDT References: <4145@zen.berkeley.edu> Reply-To: jimm@mitsumi.UUCP (James Mackraz) Organization: Mitsumi Technology Inc Lines: 31 Keywords: Intuition, MENUVERIFY, RMBTRAP, Menus, input.device, deadlock :: I think the standard way to get menus to work like dPaint is as follows: By watching MOUSEMOVE IDCMP messages, determine when the mouse pointer is in the menu bar (you can also poll Window.MouseX/Y, but using IDCMP is easy and much more system-polite). When the mouse pointer is in the menu bar, clear RMBTRAP in Window.Flags. When the mouse pointer is not in the menu bar, set RMBTRAP in Window.Flags. About the only possibility for mis-synchronization occurs if the user whips the mouse into the menu bar and quickly clicks the menu button. It is probably OK to lose the button click in this situation, but if you are doing some painting with the right button, you need to be sure you don't paint on your menu bar. Don't forget that if you want to personally process the right button, you must also set MOUSEBUTTONS in your IDCMPFlags, and to hear the mouse move, you need both MOUSEMOVE in IDCMP, and REPORTMOUSE in Window.Flags. Using the Intuition function ReportMouse() has historically caused problems because of bad bindings, so if it doesn't work for you, just set the flag yourself, either protected by Forbid/Permit, or in assembler with an atomic operation. Hope this helps. jimm PS: Bryce, I already told this to Mike. -- Jim Mackraz Mitsumi Technology, Inc. 408/980-5422 {amiga,pyramid}!mitsumi!jimm