🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #137

Posting x-events from InterViews/UniDraw

#137
From: Christian Rosenvinge
Date: Thu, 30 Jul 1992 14:44
46 lines
2412 bytes
	
We are trying to generate events to be handled by an UniDraw
application. We are doing this by generating X-events that are posted
using XSendEvent (from the same application). We are mainly posting
XButtonEvents. However, our application is not receiving the generated
events. Xev receives the events when we are testing with that
application. We believe that we are not setting all the parameters in
the XEvent structure and/or the parameters for the XSendEvent function
properly.

Below is the XButtonEvent structure as taken from Xlib.h.

typedef struct {
   int type;		/* of event */
   unsigned long serial;/* # of last request processed by server */
   Bool send_event;	/* true if this came from a SendEvent request */
   Display *display;	/* Display the event was read from */
   Window window;	/* "event" window it is reported relative to */
   Window root;	        /* root window that the event occured on */
   Window subwindow;	/* child window */
   Time time;		/* milliseconds */
   int x, y;		/* pointer x, y coordinates in event window */
   int x_root, y_root;	/* coordinates relative to root */
   unsigned int state;	/* key or button mask */
   unsigned int button;	/* detail */
   Bool same_screen;	/* same screen flag */
} XButtonEvent;

We are in particular in doubt with respect to the window, root and
subwindow fields. We can't find how to extract the applicable values
from the data structures UniDraw/InterViews allows us to work on. We
would also like advice on the "correct" way to get hold of the (X)
Display (and (X) Window) to be used as arameters to XSendEvent().

The parameters we are curently setting within the XButtonEvent are:
type, window, root, subwindow (the last three are set equal), x, y,
state, button, same_screen=true. 

Any advice or pointers to sample programs are appreciated. 

Thanks,

Christian Rosenvinge & Geir Pedersen

University of Oslo
Center for Information Technology Services
Technical Details
Message-ID: <CHRISTRO.92Jul30154444@white.uio.no>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!nntp.uio.no!christro

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!nntp.uio.no!christro
From: christro@white.uio.no (Christian Rosenvinge)
Subject: Posting x-events from InterViews/UniDraw
Message-ID: <CHRISTRO.92Jul30154444@white.uio.no>
Sender: news@ulrik.uio.no (Mr News)
Nntp-Posting-Host: white.uio.no
Organization: University of Oslo, Norway
Date: Thu, 30 Jul 1992 14:44:44 GMT
Lines: 48