Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!mcnc!godot!sherouse From: sherouse@godot.radonc.unc.edu (George W. Sherouse) Newsgroups: comp.windows.x Subject: bitmaps and backgrounds Message-ID: <885@godot.radonc.unc.edu> Date: Wed, 21-Oct-87 09:51:50 EDT Article-I.D.: godot.885 Posted: Wed Oct 21 09:51:50 1987 Date-Received: Fri, 23-Oct-87 06:46:22 EDT Organization: Radiation Oncology, NCMH/UNC, Chapel Hill Lines: 30 Keywords: sigh Section 3.2.1 of the X11 Xlib manual tells us, "The background pixmap and the window must have the same depth." God, I hate quoting manuals. As previously reported (by me) to xbugs, the V11R1 XMenu does not work on n>1-plane displays for this very reason. This week's release of X11 xfish (one of my favorite X applications, by the way) has the same problem. This suggests that most of you are using monochrome displays. At the risk of sounding elitist there is a real client portability problem. In its current state XSetWindowBackgroundPixmap is an accident waiting to happen. In my fix to XMenu I used a loop over planes to XCopyPlane from the bitmap to the pixmap. I am still not convinced that that is the best way to expand a bitmap, but that aside it seems clear to me that a new function or macro is needed to prevent ongoing transportability problems. I would propose either XSetWindowBackgroundBitmap (functionally identical to XSetWindowBackgroundPixmap but taking a bitmap as an argument and expanding it internally) and/or XMakePixmapFromBitmap (to standardize the expansion technique) be added to Xlib. The documentation of XSetWindowBackgroundPixmap should also reiterate the requirement that the Pixmap and Window be of the same depth. Meanwhile, please folks try to remember that XSetWindowBackgroundPixmap requires a pixmap of the same depth as the window and that that depth is not necessarily 1. - George