Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!CAE.WISC.EDU!wyuen From: wyuen@CAE.WISC.EDU Newsgroups: comp.windows.x Subject: Does a pixmap need be created with the window to be used on? Message-ID: <9008271556.AA02219@ws-38.cae.wisc.edu> Date: 27 Aug 90 15:56:14 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 46 I'd appreciate any help on the following: 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 error goes away when I call XSetWindowBackgroundPixmap() with ParentRelative as the pixmap argument, ie, not using the pixmap I created earlier with XCreateBitmapFromData(..., RootWindow(),....) In addition, the error surfaces only when used on some servers (sparcs running x11r4) but everything seems fine on Sun3's. 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? In other words, do I need to create the pixmap with the window I'm using it on? Further, the manual says XCreateBitmapFromData(display, drawable, data, width, height) drawable - specifies the drawable. This determines which screen to create the bitmap on. It seems to suggest that I should be allowed to create the pixmap from the RootWindow and use it on other subwindows of this RootWindow. I want to "associate" the pixmap with the RootWindow during creation because the subwindows where the pixmap to be used as background will be dynamically created and destroyed during runtime, but the pixmap pattern remains the same. Thanks for any response, preferrably back to the newsgroup as my email reception is not quite stable.