🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #24812

Widget Grabs

#24812
From: Andrew Lo
Date: Mon, 11 Jan 1993 16:23
20 lines
1377 bytes
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.


Thanks in advance
Andrew Lo

P.S. The code looks something like this...

XtAddEventHandler( widget, ButtonPressMask, TRUE, handleButtonPresses, NULL);
XtGrabPointer( widget, TRUE, ButtonPress, GrabModeAsync, GrabModeAsync, None,
		XmGetMenuCursor( XtDisplay(widget)), CurrentTime);
XAllowEvents( XtDisplay(widget), SyncPointer, CurrentTime);
Technical Details
Message-ID: <1993Jan11.162326.27272@meadow.uucp>
Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!geac!censor!meadow!alo
References: <1740@esl.ESL.COM> <141770007@hpcupt1.cup.hp.com> <1992Dec3.094912.24676@sol.ctr.columbia.edu> <1992Dec12.121026.5907@fct.unl.pt>

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.x
Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!geac!censor!meadow!alo
From: alo@meadow.uucp (Andrew Lo)
Subject: Widget Grabs
Message-ID: <1993Jan11.162326.27272@meadow.uucp>
Reply-To: alo@meadow.UUCP (Andrew Lo)
Organization: Amdahl Canada Ltd., Software Development Center
References: <1740@esl.ESL.COM> <141770007@hpcupt1.cup.hp.com> <1992Dec3.094912.24676@sol.ctr.columbia.edu> <1992Dec12.121026.5907@fct.unl.pt>
Date: Mon, 11 Jan 93 16:23:26 GMT
Lines: 20