home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.x.motif:5959 comp.windows.x:16058
- Path: sparky!uunet!gatech!darwin.sura.net!haven.umd.edu!mimsy!rosey1
- From: rosey1@cs.umd.edu (Mark Rosenblum)
- Newsgroups: comp.windows.x.motif,comp.windows.x
- Subject: Problem with MotionNotify Event
- Message-ID: <60050@mimsy.umd.edu>
- Date: 2 Sep 92 18:04:37 GMT
- Sender: news@mimsy.umd.edu
- Followup-To: rosey1@tove.umd.edu
- Distribution: na
- Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
- Lines: 45
-
- My name is Mark Rosenblum and I fairly new to X. I am trying to build an
- X application using XtIntrinsics and Motif on a SUN Sparc. I need to build
- an event handler that tracks the mouse's position over the entire screen.
- I want to use the XtIntrinsics convenience function XtAddEventHandler to add
- this event handler, as opposed to building my own event loop. I made several
- attempts to build this event handler, but I was not successful. Below is
- a summary of my widget setup and my attempts.
-
- Widget Setup:
-
- -----------------------------------------
- | Screen |
- | ------------------ |
- | | A | |
- | | | |
- | | | |
- | | | |
- | ------------------ |
- | |
- -----------------------------------------
-
-
-
- Attempt 1: XtAddEventHandler(A,PointerMotionMask,FALSE,foo_handler,NULL);
-
- The problem with this attempt was that the event was only triggered
- when the mouse moved in widget A. When the mouse moved outside of
- widget A, no MotionNotify event was triggered.
-
- Attempt 2: XtAddEventHandler(A,ButtonMotionMask,FALSE,foo_handler,NULL);
-
- In this attempt a MotionNotify event was triggered both in and
- outside of widget A, which is the response that I need, but it was
- necessary for a mouse button to be pressed to get this response. In
- my application I do not want to have to press a mouse button in order
- to track the mouse over the whole screen.
-
-
- I would greatly appreciate any help.
- Thanks in advance.
-
- Mark Rosenblum
- Univerity of Maryland
- Center for Automation Research
- College Park, Maryland
-