Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!julius.cs.uiuc.edu!wuarchive!uunet!mcsun!ukc!uos-ee!canon!smith From: smith@canon.co.uk (Mark Smith) Newsgroups: comp.windows.news Subject: Re: a problem with tNt Message-ID: <1991Jan14.234752.11464@canon.co.uk> Date: 14 Jan 91 23:47:52 GMT References: Reply-To: smith@canon.co.uk Organization: Canon Research Europe, Guildford, UK Lines: 29 ks@tut.fi (Syst{ Kari) writes: > I'm trying to have a canvas which is interactively moved by the > user. Here is a simplified code: > > [ ...code deleted... ] > > Every now and then (if mouse clicked very fast) the /movefromuser method > seems to loose the UpTransition. The consequence that system keeps drawing > the outline of the movable canvas and no other window can get a focus. > Another (too fast) click is a way to get rid of this problem. Check out the section about blocking the global event queue on pages 125-126 of the NeWS 2.1 Programmer's Guide. In your example, you should change this line in /MakeInterests: > /DownTransition Canvas MakeInterest to: > /DownTransition Canvas MakeInterest dup /Synchronous true put This sets the Synchronous key in the interest to true, which makes the DownTransition event block the input queue. You should add 'unblockinputqueue' to your callback routine, after spinning off the event manager waiting for the UpTransition. =========================================================================== Mark Smith smith@canon.co.uk Canon Research Centre Europe ...uunet!mcsun!ukc!uos-ee!canon!smith --------------------------------------------------------------------------- soft driven slow and mad like some new language