home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / windows / x / 18832 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  3.8 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!sdd.hp.com!saimiri.primate.wisc.edu!ames!agate!doc.ic.ac.uk!uknet!pyrltd!ecmwf!syj
  2. From: syj@ecmwf.co.uk (Jean-Philippe Martin-Flatin)
  3. Newsgroups: comp.windows.x
  4. Subject: Re:Double click in XmDrawingArea
  5. Message-ID: <BxAu6C.LBI@ecmwf.co.uk>
  6. Date: 6 Nov 92 14:42:11 GMT
  7. Sender: usenet@ecmwf.co.uk (NEWS deafult user)
  8. Followup-To: comp.windows.x.intrinsics
  9. Organization: ECMWF
  10. Lines: 79
  11.  
  12. (this discussion started on motif-talk --- background included)
  13.  
  14. <*> > Forgive me, but I have never before played with that. XmDrawing area
  15. <*> > translation table appears to recognize double click as a distinct
  16. <*> > event:
  17. <*> > 
  18. <*> > <Btn1Down>:     DrawingAreaInput() ManagerGadgetArm()\n\
  19. <*> > <Btn1Down>,<Btn1Up>:    DrawingAreaInput() ManagerGadgetActivate()\n\
  20. <*> > <Btn1Up>:       DrawingAreaInput() ManagerGadgetActivate()\n\
  21. <*> > <Btn1Down>(2+): DrawingAreaInput() ManagerGadgetMultiArm()\n\
  22. <*> > <Btn1Up>(2+):   DrawingAreaInput() ManagerGadgetMultiActivate()\n\
  23. <*> >         ^^^^^^
  24. <*> > 
  25. <*> > But when I arm the callback, I get separate notification for each 
  26. <*> > <Btn1Down> and <Btn1Up> no matter how fast I try to click.
  27. <*> > [My interpretation of <Btn1Up>(2+) is that it should swallow the
  28. <*> >  first Down/Up/Down, and call me on the last one ONLY].
  29. <*> > 
  30. <*> > What am I doing wrong ?
  31. <*> > 
  32. <*> > Also, if I can make it work, is there any way I can detect the double
  33. <*> > click activation in my Input callback ? (I don't see anything...).
  34. <*> > 
  35. <*> > Oh. Motif 1.1.3, build against X11R4 patchlevel 18, running on the top
  36. <*> > of R4 or X11R5 (seems to make no difference here). SunOS 4.1.2.
  37. <*> > 
  38. <*> > -- Martin
  39. <*> 
  40. <*> Do you have a window manager binding for Btn1 on the actual
  41. <*> client window in your .mwmrc ? I recall some strange behavior,
  42. <*> where mwm would grab the button presses, then replay them to
  43. <*> the client. This would cause a Leave and Enter event to appear
  44. <*> in the client event queue between button presses - breaking
  45. <*> Xt's recognition of double click.
  46. <*> 
  47. <*> Try removing from .mwmrc, any lines of the form:
  48. <*> 
  49. <*>     <Btn1Down>  window  f.raise
  50. <*> 
  51. <*> This may no longer be a problem, but it is worth checking -  try
  52. <*> running xev, and see if your server is sending the correct sequence
  53. <*> of Press/Release, without any intervening events.
  54. <*> 
  55. <*>     Alastair.
  56.  
  57. Could you please elaborate on that "strange behaviour" ? I seem to have
  58. a similar problem: double-clicking on an icon, I would expect just the
  59. application to pop up. The application does pop up, but it also receives
  60. the last ButtonRelease event. And when my pointer happens to be above
  61. a gadget in a DrawingArea, this one gets activated (translations similar
  62. to above), and a callback gets called, etc...
  63.  
  64. It looks like the icon performs no grab, and the DrawingArea is fooled
  65. by the ButtonRelease event that it should not receive. Is this problem
  66. due to Xt or the Motif window manager ?
  67.  
  68. I tried all sorts of window manager bindings (in .mwmrc) to prevent the
  69. ButtonRelease event from being passed on to the application:
  70.  
  71.     <Btn1Up>(2)                               icon    f.normalize
  72.     <Btn1Down>,<Btn1Up>,<Btn1Down>,<Btn1Up>   icon    f.normalize
  73.     ...
  74.  
  75. I tried several contexts: X11R4, X11R5, Motif 1.1.4 and Motif 1.1.5 under
  76. SunOS 4.1.1, but none succeeded.
  77.  
  78. Any idea ? Can it be something wrong in the application itself ?
  79.  
  80. Thanks in advance
  81.  
  82. /----------------------------------------------------\
  83. | Jean-Philippe Martin-Flatin                        |
  84. | European Centre for Medium-Range Weather Forecasts |
  85. | Shinfield Park                                     |
  86. | Reading RG2 9AX                                    |
  87. | England                                            |
  88. |----------------------------------------------------|
  89. |  Disclaimer: I speak for myself, not my employer   |
  90. \----------------------------------------------------/
  91.