Article View: comp.windows.x
Article #24293No way to simulate button and key events??
From: Eckmeier Karlheinz
Date: Thu, 21 Jan 1993 08:44
Date: Thu, 21 Jan 1993 08:44
42 lines
2226 bytes
2226 bytes
I'm looking for a way to write a client, that generates key and button events
and send these through the server to the appropriate window(s) and client(s).
These "synthetic" events should be distributed just like every other
"normal" event, which was generated through some user action at a keyboard or
with the mouse. They should be distributed with regard to InputFocus,
event propagation rules and active/passive grabs.
To generate the synthetic events with XSendEvent does NOT work because
- the contents of the event structure is not changed by the server,
with one exception - the send_event flag, which is set to True.
==> There is no help to fill in the elements of the event structure.
The problem is to find the destination window(s).
- the propagate flag in the XSendEvent call is ignored, despite the
documentation says the server will distribute the event according the
event propagation rules, if the flag is set True.
==> The propagation has to be done by the client with a lot of calls
like XGetWindowAttributes(), XGetInputFocus(), ...
- it ignores grabs. There is no way to get information from the
server about any grabs in effect.
==> There is no way to find out, if some client has grapped some keys
or buttons.
There is no problem with the server setting the send_event flag, so every
client which doesn't like "synthetic" events can dischard them.
The main problem, which cannot be solved is the missing information
about grabs.
Did I miss something?
Anybody likes to comment? Hints to solve the problem?
Thanks a lot
Karlheinz
--
Karlheinz Eckmeier |
PCS Computer Systeme GmbH | khe@pcsbst.pcs.com
8000 Muenchen 90, Germany |
Technical Details
Message-ID:
<KHE.93Jan21094402@meepmeep.pcs.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!news.netmbx.de!Germany.EU.net!pcsbst!pcsbst!kheShow Full Headers
Complete Article Headers
Newsgroups: comp.windows.x Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!news.netmbx.de!Germany.EU.net!pcsbst!pcsbst!khe From: khe@meepmeep.pcs.com (Eckmeier Karlheinz) Subject: No way to simulate button and key events?? Organization: PCS Computer Systems, GmbH Distribution: comp Date: Thu, 21 Jan 1993 08:44:02 GMT Message-ID: <KHE.93Jan21094402@meepmeep.pcs.com> Sender: @pcsbst.pcs.com Lines: 42