🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #12139

mouse in window via notifier?

#12139
From: phill%med-image.compsci.bristol....
Date: Sat, 22 Apr 1989 17:13
23 lines
1449 bytes
I am writing a program where I have to know whether the mouse is in the
current window or elsewhere on the desk top at all times.

I've tried interposing an event handler and setting a flag based on
occurances of LOC_WINENTER and LOC_WINEXIT, but that doesn't catch all
cases. For example, if you move across a thin frame border onto a canvas
very often no LOC_WINENTER is generated.

I then tried having an event procedure for each of the top level portions
of my program - panels, canvases etc. In each of these I check for
LOC_RGNENTER, LOC_RGNEXIT, LOC_WINENTER and LOC_WINEXIT.  Intelligent
setting of a flag when these events occur works pretty well, but I'm not
convinced it's foolproof.

Does anyone know of a better, if possible foolproof, way?

I will email a summary to the list if desired.

Phillip Everson
Medical Imaging
Dept Comp Sci
University of Bristol, UK
<everson@cs.bris.ac.uk>
Technical Details
Message-ID: <8904031518.aa10567@kukini.CompSci.Bristol.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: phill%med-image.compsci.bristol.ac.uk@nss.cs.ucl.ac.uk
Newsgroups: comp.sys.sun
Subject: mouse in window via notifier?
Keywords: Windows
Message-ID: <8904031518.aa10567@kukini.CompSci.Bristol.ac.uk>
Date: 22 Apr 89 17:13:03 GMT
Sender: usenet@rice.edu
Organization: Sun-Spots
Lines: 23
Approved: Sun-Spots@rice.edu
Original-Date: Mon, 3 Apr 89 15:13:39 BST
X-Sun-Spots-Digest: Volume 7, Issue 240, message 10 of 13