tek@CS.UCLA.EDU (02/01/89)
Suppose you have an application that uses two windows. One top-level window and a subwindow. The subwindow must satisfy some set of constraints on its position and size in the top-level window. Now suppose you resize the top-level window: from this: to this: +-------+ +---------------+ #1: | | #2: | | | +-+ | | +-+ | | | | | | | | | | +-+ | | +-+ | | | | | +-------+ | | | | | | | | | | | | +---------------+ now, of course, you want to resize and move the subwindow to this: +---------------+ #3: | | | | | | | +---+ | | | | | | | | | | | | | | +---+ | | | | | | | +---------------+ Let's assume there is no backing store, no gravity and that expose is selected on both windows. Now, when going from #1 to #2, you get a series of exposure events on the top-level window. Then, when you go from #2 to #3, you get a series of exposure events on the top-level window and the subwindow. A "smart" application that knew what was in each region in the window would not redraw anything twice in this sequence. But a "dumb" one, which redraws everything on an exposure, would redraw the top-level window twice (skipping all non-zero count exposure events). Is there any technique, one can use to prevent the "dumb" version from redrawing the top-level window more than once? Is there a way of recognizing all the exposures as part of the same "macro" event, without possibly missing an exposures due to outside interference? My apologies, if this has been discussed before ... Ted Kim ARPAnet: tek@penzance.cs.ucla.edu UCLA Computer Science Department UUCP: ...!ucbvax!cs.ucla.edu!tek 3804C Boelter Hall PHONE: (213) 206-8696 Los Angeles, CA 90024 ESPnet: tek@ouija.board
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (02/01/89)
Is there any technique, one can use to prevent the "dumb" version from redrawing the top-level window more than once? You could set Unmap win-gravity on the child. When the parent is resized, the child will get unmapped, and the parent will repaint. Reconfigure the child, and then map it again. The parent will not get further exposures. Is there a way of recognizing all the exposures as part of the same "macro" event, without possibly missing an exposures due to outside interference? I'm not sure what you mean by "macro" event.