Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!ispd-newsserver!kodak!eastman!iliad!lsls00 From: levi@kodak.com (Ilia Levi) Newsgroups: comp.windows.x Subject: Extra Expose event from Window Manager Message-ID: <1673@eastman.UUCP> Date: 23 Jan 91 21:11:55 GMT Sender: news@eastman.UUCP Reply-To: levi@kodak.com (Ilia Levi) Distribution: na Organization: Eastman Kodak Lines: 17 I have a problem with a simple program using Xlib. After setting up the window, I issue XMapRaised and Xflush. Then I wait for the Expose event with XNextEvent, and then use XFillPolygon to draw a rectangle. It works fine if I don't run a window manager, however with olwm or twm the rectangle does not appear in the window. If no WM is running, the rectangle is displayed. However, if using a window manager, I issue another XNextEvent I get another Expose event, and the rectangle is displayed. Sleep for 1 second instead of the second XNextEvent also works. What's going on??? How do I know how many events to wait for? We checked the count field in the XExpose Event structure, and in every case it is 0. Thanks for any clues, Ilia.