home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / x / motif / 5959 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  2.1 KB

  1. Xref: sparky comp.windows.x.motif:5959 comp.windows.x:16058
  2. Path: sparky!uunet!gatech!darwin.sura.net!haven.umd.edu!mimsy!rosey1
  3. From: rosey1@cs.umd.edu (Mark Rosenblum)
  4. Newsgroups: comp.windows.x.motif,comp.windows.x
  5. Subject: Problem with MotionNotify Event
  6. Message-ID: <60050@mimsy.umd.edu>
  7. Date: 2 Sep 92 18:04:37 GMT
  8. Sender: news@mimsy.umd.edu
  9. Followup-To: rosey1@tove.umd.edu
  10. Distribution: na
  11. Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
  12. Lines: 45
  13.  
  14. My name is Mark Rosenblum and I fairly new to X.  I am trying to build an
  15. X application using XtIntrinsics and Motif on a SUN Sparc.  I need to build
  16. an event handler that tracks the mouse's position over the entire screen.
  17. I want to use the XtIntrinsics convenience function XtAddEventHandler to add
  18. this event handler, as opposed to building my own event loop.  I made several
  19. attempts to build this event handler, but I was not successful.  Below is 
  20. a summary of my widget setup and my attempts.
  21.  
  22.     Widget Setup:
  23.  
  24.         -----------------------------------------
  25.              | Screen                |
  26.             |            ------------------         |
  27.         |            | A              |           |
  28.         |               |                |        |
  29.         |            |              |         |
  30.         |            |                |          |
  31.         |            ------------------           |
  32.             |                    |
  33.         -----------------------------------------
  34.  
  35.  
  36.  
  37. Attempt 1:  XtAddEventHandler(A,PointerMotionMask,FALSE,foo_handler,NULL);
  38.  
  39.     The problem with this attempt was that the event was only triggered
  40.     when the mouse moved in widget A.  When the mouse moved outside of
  41.     widget A, no MotionNotify event was triggered.
  42.  
  43. Attempt 2: XtAddEventHandler(A,ButtonMotionMask,FALSE,foo_handler,NULL);
  44.  
  45.     In this attempt a MotionNotify event was triggered both in and 
  46.     outside of widget A, which is the response that I need, but it was
  47.     necessary for a mouse button to be pressed to get this response.  In
  48.     my application I do not want to have to press a mouse button in order
  49.     to track the mouse over the whole screen. 
  50.  
  51.  
  52. I would greatly appreciate any help. 
  53. Thanks in advance.
  54.  
  55. Mark Rosenblum
  56. Univerity of Maryland
  57. Center for Automation Research
  58. College Park, Maryland
  59.