🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #24860

Re: Widget Grabs

#24860
From: Douglas S. Rand
Date: Tue, 12 Jan 1993 17:46
22 lines
1762 bytes
In article <1993Jan11.162326.27272@meadow.uucp> alo@meadow.uucp (Andrew Lo) writes:

   Hi! I'm a widget programmer.  I have created a widget in which under certain
   circumstances I need the widget to grab all button presses for the entire
   screen.  Thus far, I have achieved this by using XtGrabPointer followed by
   an XAllowEvents.  I have an event handler for the widget that intercepts all
   the button press events at this time.  This works.  
   However, when I press a cascade button it takes the grab away from me without 
   me calling XtUngrabPointer.  How do I prevent this from happening.?  
   Please email me directly.

I don't believe you can prevent this.  Grabs transfer if something else 
requests one.  I do suggest that you consider why you are imposing
a grab.  Grabs should be used very sparingly,  if at all,  in 
normal widgets.  The usual exceptions are modal behaviors such
as popup or pulldown menus.  

--
Douglas S. Rand <drand@osf.org>		OSF/Motif Dev.
Snail:         11 Cambridge Center,  Cambridge,  MA  02142
Disclaimer:    I don't know if OSF agrees with me... let's vote on it.
Amateur Radio: KC1KJ
Technical Details
Message-ID: <DRAND.93Jan12174614@spinner.osf.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!enterpoop.mit.edu!paperboy.osf.org!paperboy!drand
References: <1740@esl.ESL.COM> <141770007@hpcupt1.cup.hp.com> <1992Dec3.094912.24676@sol.ctr.columbia.edu> <1992Dec12.121026.5907@fct.unl.pt> <1993Jan11.162326.27272@meadow.uucp>

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.x
Path: arc1-ca.pugleaf.net!sparky!uunet!enterpoop.mit.edu!paperboy.osf.org!paperboy!drand
From: drand@spinner.osf.org (Douglas S. Rand)
Subject: Re: Widget Grabs
In-Reply-To: alo@meadow.uucp's message of Mon, 11 Jan 93 16:23:26 GMT
Message-ID: <DRAND.93Jan12174614@spinner.osf.org>
Sender: news@osf.org (USENET News System)
Organization: Open Software Foundation
References: <1740@esl.ESL.COM> <141770007@hpcupt1.cup.hp.com>
 <1992Dec3.094912.24676@sol.ctr.columbia.edu>
 <1992Dec12.121026.5907@fct.unl.pt> <1993Jan11.162326.27272@meadow.uucp>
Date: 12 Jan 93 17:46:14
Lines: 22