home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / x / 21394 < prev    next >
Encoding:
Text File  |  1993-01-21  |  2.1 KB  |  54 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!news.netmbx.de!Germany.EU.net!pcsbst!pcsbst!khe
  3. From: khe@meepmeep.pcs.com (Eckmeier Karlheinz)
  4. Subject: No way to simulate button and key events??
  5. Organization: PCS Computer Systems, GmbH
  6. Distribution: comp
  7. Date: Thu, 21 Jan 1993 08:44:02 GMT
  8. Message-ID: <KHE.93Jan21094402@meepmeep.pcs.com>
  9. Sender: @pcsbst.pcs.com
  10. Lines: 42
  11.  
  12.  
  13. I'm looking for a way to write a client, that generates key and button events
  14. and send these through the server to the appropriate window(s) and client(s).
  15. These "synthetic" events should be distributed just like every other
  16. "normal" event, which was generated through some user action at a keyboard or
  17. with the mouse. They should be distributed with regard to InputFocus,
  18. event propagation rules and active/passive grabs.
  19.  
  20. To generate the synthetic events with XSendEvent does NOT work because
  21.  
  22.     - the contents of the event structure is not changed by the server,
  23.       with one exception - the send_event flag, which is set to True. 
  24.       ==> There is no help to fill in the elements of the event structure.
  25.           The problem is to find the destination window(s).
  26.  
  27.     - the propagate flag in the XSendEvent call is ignored, despite the 
  28.       documentation says the server will distribute the event according the
  29.       event propagation rules, if the flag is set True.
  30.       ==> The propagation has to be done by the client with a lot of calls
  31.           like XGetWindowAttributes(), XGetInputFocus(), ...
  32.  
  33.     - it ignores grabs. There is no way to get information from the
  34.       server about any grabs in effect.
  35.       ==> There is no way to find out, if some client has grapped some keys
  36.           or buttons. 
  37.  
  38. There is no problem with the server setting the send_event flag, so every
  39. client which doesn't like "synthetic" events can dischard them.
  40. The main problem, which cannot be solved is the missing information
  41. about grabs.
  42.  
  43. Did I miss something? 
  44. Anybody likes to comment? Hints to solve the problem?
  45.  
  46.  
  47. Thanks a lot
  48.  
  49. Karlheinz
  50. --
  51. Karlheinz Eckmeier         |
  52. PCS Computer Systeme GmbH  |  khe@pcsbst.pcs.com
  53. 8000 Muenchen 90, Germany  |
  54.