home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / windows / x / 14687 < prev    next >
Encoding:
Internet Message Format  |  1992-07-31  |  2.2 KB

  1. Path: sparky!uunet!olivea!hal.com!alf.hal.COM!not-for-mail
  2. From: ess@hal.COM (Eric Swildens)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: Help!  Cannot move or resize windows by sending events.
  5. Message-ID: <15bjtsINNbsk@alf.hal.COM>
  6. Date: 31 Jul 92 14:49:32 GMT
  7. References: <1992Jul30.202924.17766@nynexst.com>
  8. Organization: HaL Computer Systems, Inc.
  9. Lines: 37
  10. NNTP-Posting-Host: alf.hal.com
  11.  
  12. In article <1992Jul30.202924.17766@nynexst.com> rsilvers@powwow.nynexst.com
  13. (Rob Silvers) writes:
  14. >    I am writing a mouse driver that uses XWarpPointer to move the pointer
  15. >and XSendEvent to send ButtonPress and ButtonRelease Events (to the
  16. >lowest child window under the pointer).  It works for pushing MOTIF
  17. >buttons, opening and closing windows, and even for drawing with the
  18. >mouse in a drawing program.  When I try to move or resize a window
  19. >with either olwm or twm it does not work.  For move in twm, it can
  20. >usually move the window up and down, ans SOMETIMES left and right.
  21. >In olwm it cannot move them at all.  For resize, when I send a
  22. >ButtonPress to the resize widget, it just freezes.  Am I supposed
  23. >to be sending other events?  If so, to what window?
  24.  
  25. Most Window managers perform a GrabServer on the X server when
  26. resizing and moving the window around to draw the xor'ed outline without
  27. having to worry about something changing between the first xor draw and
  28. the second (this would leave a mess on your screen).  A GrabServer will
  29. shut down connections to all clients except the one which did the
  30. GrabServer until that client releases it.
  31.  
  32. What is probably happening is:
  33.  
  34.     1] You are sending events which go to resize a window
  35.     2] The window manager starts drawing the outline of the
  36.        window and sends a GrabServer to the server
  37.     3] Your client which is sending events to resize the window
  38.        cant talk to the server anymore, so the resize cannot complete 
  39.     4] The whole thing hangs
  40.  
  41. This was a problem with the XTestExtension1 extension also.  The
  42. xrecplay.tar.Z distribution has a server patch in it which includes
  43. code which disallows GrabServers while you are in a X test playback session.
  44.  
  45. Any product which allows record/playback of events and deals with clients
  46. that may do a GrabServer/Pointer/etc. will face similar problems.
  47.  
  48. ESS
  49.