Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!super.upenn.edu!dsl.cis.upenn.edu!bradley From: bradley@dsl.cis.upenn.edu (John Bradley) Newsgroups: comp.windows.x Subject: Configure/Expose event ordering. Message-ID: <2259@super.upenn.edu> Date: Wed, 21-Oct-87 18:23:49 EDT Article-I.D.: super.2259 Posted: Wed Oct 21 18:23:49 1987 Date-Received: Sat, 24-Oct-87 07:00:43 EDT Sender: news@super.upenn.edu Reply-To: bradley@cis.upenn.edu (John Bradley) Distribution: na Organization: University of Pennsylvania Lines: 19 I'm writing a *very* simple-minded program that merely displays some crap in a window, and when you click the mouse in it, it goes away. It also has to keep the window contents accurate when it's exposed, or re-sized. My problem is this. I've set the event mask to "ButtonPressMask | ExposureMask | StructureNotifyMask". In my main loop I simply check for those three events. Everything works well until I re-size the window (via uwm). When I do, I get an ExposeEvent, followed by a Configure and another Expose. This causes the program to redraw the contents of the window twice, the first time scaled wrong. My question is: "Why do I get the first Expose event?" Should I peek ahead for a Configure event whenever I get an Expose, and if so, don't bother redrawing? Seems unclean. Suggestions gleefully accepted. John Bradley - University of Pennsylvania