home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!usc!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
- Subject: Re: HELP! XSetWindowAttributes and XSetWMHints
- Message-ID: <1992Sep7.173629.13755@thunder.mcrcim.mcgill.edu>
- Organization: McGill Research Centre for Intelligent Machines
- References: <1992Sep4.015632.947@mailhost.ocs.mq.edu.au> <1992Sep4.084114.2596@mailhost.ocs.mq.edu.au>
- Date: Mon, 7 Sep 92 17:36:29 GMT
- Lines: 28
-
- In article <1992Sep4.084114.2596@mailhost.ocs.mq.edu.au>, s8923098@macnab.mqcs.mq.oz.au (Josef WIDJAJA) writes:
- > In article <1992Sep4.015632.947@mailhost.ocs.mq.edu.au> s8923098@macnab.mqcs.mq.oz.au (Josef WIDJAJA) writes:
- >> [drawing works when, and only when, window is set override-redirect.]
- > I think I now know why. When the override_redirect is set to False,
- > the Window Manager redraws the window generating an Expose event.
- > Upon receving this event, the image has to be redrawn.
-
- Yes and no.
-
- The window manager never redraws the window. Redrawing your window is
- entirely up to you. The Expose event always happens, and it is
- generated by the server when the window is first displayed. It's just
- that when your window is override-redirect, this happens immediately
- upon the window being mapped; when not, the WM makes the user position
- it, delaying the actual mapping and thus the Expose. You didn't
- include enough of your program to be sure, but I suspect that you were
- blindly charging ahead and drawing without waiting for the Expose.
- This worked when, and only when, the window was actually mapped
- immediately after your program requested that it be mapped.
-
- That's the no part. The yes part is that yes, you have to redraw upon
- receiving Expose events, so even if the reasoning is wrong, the
- conclusion is right.
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-