🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #38163

sending events while grabbing pointer

#38163
From: Alex Pakter
Date: Fri, 11 Feb 1994 04:14
35 lines
2387 bytes
Hey'all-

	I'm trying to do the following:

	I need to have my application pop up a shell, which the user
can interact with.  If the user clicks in this shell (which has other
widgets in it), I want these events to be processed normally.
	If the user clicks anywhere outside this shell, I need to catch this,
so that my application can hide the popup shell.  Clicks outside the
popup shell should not be processed except by my application.

	I need keyboard input to be enabled so that the user can type into
a text field on my application which is NOT on the popup shell.

	So far I have attempted the following: 	
	I do an XtGrabPointer, and I add event handlers on my application
to catch all relevant events (ButtonPress, ButtonRelease, ButtonMotion).
In the event handler, I do an XQueryPointer, and find out where the
pointer is.  If it is in the shell, I use XSendEvent to forward the event
to the appropriate subwindow of the shell.
  If the click occurs outside the shell, I hide the shell, and do an
XUngrabPointer.

My problem?  It doesn't work.  The events that I send with XSendEvent
aren't getting to their appropriate widgets.  Note that I am calling
XSendEvent while I have the pointer grab. I am sending them to the
window returned in the "child_return" argument to XQueryPointer.

Can anyone help?  

Thanks very much-

Alex   | Alex Pakter
----   | alex@brt.com
  
Technical Details
Message-ID: <2jf0nf$ouk@brt.brt.com>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!sdd.hp.com!sgiblab!idiom.berkeley.ca.us!brt.com!brt.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103734,a922d0c655114cab,start
X-Google-Attributes: gid103734,public
X-Google-Thread: 10b6ac,a922d0c655114cab,start
X-Google-Attributes: gid10b6ac,public
X-Google-Thread: 10e286,a922d0c655114cab,start
X-Google-Attributes: gid10e286,public
X-Google-Thread: 1078e5,a922d0c655114cab,start
X-Google-Attributes: gid1078e5,public
X-Google-ArrivalTime: 1994-02-10 20:14:39 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!sdd.hp.com!sgiblab!idiom.berkeley.ca.us!brt.com!brt.com!not-for-mail
From: alex@brt.com (Alex Pakter)
Newsgroups: comp.windows.x,comp.windows.x.motif,ba.windows.x,comp.windows.x.apps
Subject: sending events while grabbing pointer
Date: 10 Feb 1994 20:14:39 -0800
Organization: Berkeley Research and Trading / Berkeley, CA
Lines: 35
Distribution: inet
Message-ID: <2jf0nf$ouk@brt.brt.com>
NNTP-Posting-Host: brt.brt.com
X-Newsreader: TIN [version 1.2 PL2]