klee@daisy.UUCP (Ken Lee) (10/19/88)
We have a client that uses SouthWestGravity on resize. When we resize this window using a window manager popup menu, we have a scenario like this: 1. window manager popup comes up, use selects "resize" 2. popup goes away, X queues expose event for client 3. window manager grabs server and gets new size from user 4. window manager ungrabs server and XResize's window 5. X server resizes window, copying image according to gravity, and queues resize/gravity events for client 6. client reads expose event from (2) 7. client reads resize/gravity events from (5) Note that when the client reads the expose event, the server has already moved the graphics, but the client doesn't know it yet, so the client redraws in the (old) wrong place, leaving a hole in the (new) right place. Does anyone know of a good, clean way to redraw correctly? We'd prefer not to have to use backing store, since that's pretty expensive on our color displays. Thanks much for any help. Ken Lee Daisy Systems Corp., Interactive Graphics Tools Dept. -- uucp: {ames!atari, ucbvax!sgi, pyramid, uunet}!daisy!klee arpanet: daisy!klee@sgi.com or daisy!klee@uunet.uu.net I'm not a tourist, I was born in California.
RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (10/27/88)
Date: 19 Oct 88 00:02:08 GMT From: sgi!daisy!klee@bloom-beacon.mit.edu (Ken Lee) We have a client that uses SouthWestGravity on resize. ... Note that when the client reads the expose event, the server has already moved the graphics, but the client doesn't know it yet, so the client redraws in the (old) wrong place, leaving a hole in the (new) right place. Does anyone know of a good, clean way to redraw correctly? One way is to enable ResizeRedirect on your window, in which case the window manager's resize request will not be executed, but will be sent to you as an event. You are obligated to obey that request, but you are now in a position to do it synchronously, so you will know when the gravity shift takes effect. We'd prefer not to have to use backing store, since that's pretty expensive on our color displays. Using save-under on the popup menu would also help.