Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: XCopyPlane() on color Vaxstation 2000s Message-ID: <8911010656.AA19525@Larry.McRCIM.McGill.EDU> Date: 1 Nov 89 06:56:55 GMT Sender: root@bloom-beacon.MIT.EDU Organization: The Internet Lines: 35 > I have a simple client which just displays a bitmap file in a window. > I call XReadBitmapFile() and create a GC with BlackPixel and > WhitePixel as foreground and background respectively. Then, AFTER > RECEIVING AN EXPOSE EVENT, I just use XCopyPlane to display the > exposed part of the pixmap. Good, you've avoided the first problem. (But you've already created another, probably without realizing it.) > gcval.foreground=BlackPixel(disp,0); > gcval.background=WhitePixel(disp,0); Not that it's related to your problem, but this sort of assumption is a common headache of mine. Not everybody runs black-on-white! > XMapRaised(disp,win); > XSelectInput(disp, win, ExposureMask|ButtonPressMask|KeyPressMask); > for (;;) > [...read events and redraw stuff upon an Expose event...] Suppose the server generates Expose events from the MapRaised before it acts on the SelectInput? Guess what that will do... By the way, you needn't XFlush after drawing; XNextEvent will flush for you if necessary. Why is there a difference? I can only guess, and it wouldn't even be an informed guess, because I've never even seen a DEC server. So your guess is at least as good as and probably better than mine. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu