home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / 20757 < prev    next >
Encoding:
Internet Message Format  |  1993-01-05  |  1.7 KB

  1. Xref: sparky comp.windows.x:20757 comp.windows.x.intrinsics:709 comp.windows.x.motif:8340
  2. Newsgroups: comp.windows.x,comp.windows.x.intrinsics,comp.windows.x.motif
  3. Path: sparky!uunet!ods!chris
  4. From: chris@ods.com (Chris Atkins)
  5. Subject: Re: X/Xt/Motif Event Interleaving?
  6. Message-ID: <1993Jan5.151408.3422@ods.com>
  7. Followup-To: comp.windows.x,comp.windows.x.intrinsics,comp.windows.x.motif
  8. Organization: Optical Data Systems, Inc.
  9. X-Newsreader: TIN [version 1.1 PL8]
  10. References: <BUZZ.93Jan4135708@lion.bear.com>
  11. Date: Tue, 5 Jan 1993 15:14:08 GMT
  12. Lines: 32
  13.  
  14. Buzz Moschetti (buzz@bear.com) wrote:
  15. : We are trying to create a very simple "drag-n-drop" type UI.  All widgets 
  16. : that can be dragged or dropped on will live in the same container widget
  17. : (xmFormWidgetClass).  Thus, we thought it would be possible to add event
  18. : handlers to all child widgets as follows:
  19.  
  20. :     XtAddEventHandler(widget,
  21. :         EnterWindowMask | 
  22. :         ButtonPressMask | ButtonReleaseMask | Button1MotionMask,
  23. :               FALSE, my_event_proc, client_data);
  24.  
  25. : Assume we have two button widgets.  Clicking on and dragging either widget
  26. : correctly hits my_event_proc() with event->type set accordingly, likewise
  27. : for entering the widgets.
  28.  
  29. : What we thought would happen is while, say, widget 1 was dragged over
  30. : widget 2, the latter's EnterNotify event would appear in the "stream" of
  31. : widget 1's MotionNotify events, e.g.
  32.  
  33. :     Dragging [w1]...
  34. :     Dragging [w1]...
  35. :     EnterNotify [w2]...
  36. :     Dragging [w1]...
  37.  
  38. : We do *not* see this behavior.  The problem is that widget 2 never gets
  39. : the EnterNotify event until *after* the button is released, which is
  40. : too late:
  41.  
  42. A button press event sets up a passive grab.
  43.  
  44. Chris Atkins
  45. chris@ods.com
  46.