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