Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!sdd.hp.com!spool.mu.edu!uunet!olivea!mintaka!bloom-beacon!eru!hagbard!sunic!dkuug!diku!bombadil From: bombadil@diku.dk (Kristian Nielsen) Newsgroups: comp.sys.amiga.programmer Subject: Re: RMB question Message-ID: <1991May9.133425.19358@odin.diku.dk> Date: 9 May 91 13:34:25 GMT References: <1991May8.155337.5049@zorch.SF-Bay.ORG> Sender: bombadil@freja.diku.dk Organization: Department of Computer Science, U of Copenhagen Lines: 31 mike@zorch.SF-Bay.ORG (Mike Smithwick) writes: >[] >Is there an easy and legal way to catch a right-mouse button event under >intuition while still having access to the menus (since RMBTRAP traps >the right-button before the menu stuff could get it). If what you want to do is to be able to detect when the user brings up the menu-bar, you should probably use the MENUVERIFY IDCMP-flag (which is totally legal, as long as you watch out for deadlocks/mousefreezing, which is bad in pre-2.0). This way you can respond to the button yourself, and let intuition handle the menus afterwards. If, on the other hand you are after the sort of thing that Dpaint does, you could switch RMBTRAP on and off using SetIDCMP() (or something similar). Simply request MOUSEMOVE, and when the mouse gets over the titlebar, de-activate the RMBTRAP. Now that I think of it, I'm not fully sure that RMBTRAP is an IDCMP-flag, but if it is, this is also very legal. (DPaint also uses MENUVERIFY to fix the colors for the menu). >mike > >-- >"There is no problem to big that can't be solved with high explosives"-Rush >Mike Smithwick - ames!zorch!mike Hope this helps, - Kristian.