Path: utzoo!attcan!uunet!mcvax!enea!kth!draken!liuida!tegen From: tegen@prefix.liu.se (Clas Tegenfeldt) Newsgroups: comp.sys.amiga Subject: Re: DMouse Summary: Bogus Forbid() Keywords: Forbid() Input-handler LockLayers() Dmouse Workstation Message-ID: <947@prefix.liu.se> Date: 30 Sep 88 13:13:06 GMT References: <8809281725.AA21445@cory.Berkeley.EDU> Organization: CIS Dept, Univ of Linkoping, Sweden Lines: 62 [ Eat dirt...] I love DMouse too, but... DMouse makes a big no-no when trying to change the active window. The offending sequence of commands is: Forbid(); ActivateWindow(); Permit(); This results in a great lock-up if somebody else (read "me") has performed LockLayers(). ActivateWindow is waiting for me to Unlock the layers but since I am an input handler (actually, it's my program that is an input handler) I won't get the proper input event since DMouse is blocking the input. The conclusion is that ANY program that locks the layers will cause DMouse to lock the input handling if the mouse is moved to another window. If I hold down a mouse button when moving the mouse everything works fine, but then again, if I press a key DMouse tries to change the active window and here we go again... Solutions: (Matt!) Change the input handler to Signal the main task so that the waiting won't block the input stream. Check to see if the layers are locked. Is this possible? If they are locked, don't try to change the active window. There is another solution: Intuition doesn't encounter this problem. Why? Are all input handlers removed? Tell me, what is that other solution? Background: I've written a set of programs. One of them implements pop-up menus similar to those on Sun and Xerox, i.e. activated by the right mouse button. If I move the mouse out of the menu and press a key... se above. When the problem is solved the programs will replace the Workbench with an environment similar to that on Sun & Xerox Workstations, including: Background menus with user definable menu items, Prompt Window available to every task, Pop-up menus available to every program, File Browser (a la Peter "U-Wolf" Da Silva) with user definable pop-up menu letting you add your own favourite "show", "type", "more", etc, Snapping of characters and parts of the screen (for later character snapping), Magnifier window, and more things to come. Note that these programs use Arp! Disclaimer: Any opinions expressed are totally my own, but please don't tell my mother that. BTW, I'm not the one you think. This is a borrowed userid, but feel free to answer to this address. EMail: C86.M-KARLSSON@XNS.Liuida.Seismo SMail: Mikael Karlsson, Lovsattersvagen 10, S585 98 LINKOPING, SWEDEN Phone: +46 13 50479