Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!ucbvax!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: Does a pixmap need be created with the window to be used on? Message-ID: <9008282143.AA17720@Larry.McRCIM.McGill.EDU> Date: 28 Aug 90 21:43:44 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 35 > I created a pixmap using XCreateBitmapFromData( > display, > RootWindow(display, screen_id), > data, > WIDTH, > HEIGHT); > and use the pixmap created on another window created later, as its > background_pixmap. > However I'm getting an X_ChangeWindowAttributes error with BadMatch > (invalid parameter attributes) when I, right after created the > window, I call XSetWindowBackgroundPixmap() to set it. The most probable cause that comes to mind is that the window is not one bit deep. Since the bitmap you create is only one bit deep, the window must also be one bit deep, or you will get a BadMatch error. > In addition, the error surfaces only when used on some servers > (sparcs running x11r4) but everything seems fine on Sun3's. Hmmm, are the SPARCs color but the Sun-3s monochrome? > NOW, the question is, is it generally OK to create a pixmap using the > RootWindow() or some other top level windows, and use it later with > other subwindows to be created? It *ought* to be OK. If a pixmap created on some screen with some depth doesn't work with a window of the same screen and depth, there's a bug somewhere. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu