mouse@LARRY.MCRCIM.MCGILL.EDU (10/13/90)
> I have an Xt program that check for resize and expose events. As I > understand it, one or more expose event should follow a resize event > and this is exactly what happens in Xlib. Not necessarily; if a window is shrunk you will not necessarily get an Expose. After all, no part of the window is visible that wasn't visible before. (Why did you get such an event before? I can only guess; I would guess something strange in the window manager you're using is causing the window to be moved around for small periods of time during the resize operation, and this is causing the Expose. Why this would go away when you start using Xt is anybody's guess, though it may have something to do with windwo-manager hint properties Xt puts on the window that you weren't giving when you used Xlib. It's also possible that Xt turns on backing-store for you, and this may be related.) der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu
keith@EXPO.LCS.MIT.EDU (Keith Packard) (10/13/90)
> Not necessarily; if a window is shrunk you will not necessarily get an > Expose. After all, no part of the window is visible that wasn't > visible before. By looking at the CreateWindow request, you'll notice that the default bit-gravity for a window is Forget. Unless the application specifically sets it to something else, everytime the window is resized, it will get exposure events, even if the window has backing-store (see the ConfigureWindow request). A better to track resize would obviously be to select for StructureNotify and pay attention to ConfigureNotify events.
marbru@auto-trol.UUCP (Martin Brunecky) (10/16/90)
In article <1990Oct12.205123.27352@vicorp.com> daniel@vicorp.UUCP (Daniel Dee) writes: >As I understand it, one or more expose event should follow a resize >event and this is exactly what happens in Xlib. When I converted >my program to using Xt though, I stop getting expose event >after resize if I reduce the size my window. Expanding the >window continues to work fine. What is your window's bit_gravity member ? The default, often used by Xt widgets, is NorthWestGravity. If you "shrink" such window, you should not get an exposure event (though the server has the right to send you one - we are talking X here-). I am forcing bit_gravity to ForgetGravity in widgets where I want to get exposure event on resize/shrink, and it seems to work right for me. -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky [BORN TO BASH UIL] marbru@auto-trol.COM (303) 252-2499 {...}ncar!ico!auto-trol!marbru Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404