home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / 21073 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.7 KB  |  37 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!enterpoop.mit.edu!paperboy.osf.org!paperboy!drand
  3. From: drand@spinner.osf.org (Douglas S. Rand)
  4. Subject: Re: Widget Grabs
  5. In-Reply-To: alo@meadow.uucp's message of Mon, 11 Jan 93 16:23:26 GMT
  6. Message-ID: <DRAND.93Jan12174614@spinner.osf.org>
  7. Sender: news@osf.org (USENET News System)
  8. Organization: Open Software Foundation
  9. References: <1740@esl.ESL.COM> <141770007@hpcupt1.cup.hp.com>
  10.     <1992Dec3.094912.24676@sol.ctr.columbia.edu>
  11.     <1992Dec12.121026.5907@fct.unl.pt> <1993Jan11.162326.27272@meadow.uucp>
  12. Date: 12 Jan 93 17:46:14
  13. Lines: 22
  14.  
  15. In article <1993Jan11.162326.27272@meadow.uucp> alo@meadow.uucp (Andrew Lo) writes:
  16.  
  17.    Hi! I'm a widget programmer.  I have created a widget in which under certain
  18.    circumstances I need the widget to grab all button presses for the entire
  19.    screen.  Thus far, I have achieved this by using XtGrabPointer followed by
  20.    an XAllowEvents.  I have an event handler for the widget that intercepts all
  21.    the button press events at this time.  This works.  
  22.    However, when I press a cascade button it takes the grab away from me without 
  23.    me calling XtUngrabPointer.  How do I prevent this from happening.?  
  24.    Please email me directly.
  25.  
  26. I don't believe you can prevent this.  Grabs transfer if something else 
  27. requests one.  I do suggest that you consider why you are imposing
  28. a grab.  Grabs should be used very sparingly,  if at all,  in 
  29. normal widgets.  The usual exceptions are modal behaviors such
  30. as popup or pulldown menus.  
  31.  
  32. --
  33. Douglas S. Rand <drand@osf.org>        OSF/Motif Dev.
  34. Snail:         11 Cambridge Center,  Cambridge,  MA  02142
  35. Disclaimer:    I don't know if OSF agrees with me... let's vote on it.
  36. Amateur Radio: KC1KJ
  37.