Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!mailrus!tut.cis.ohio-state.edu!bloom-beacon!RIACS.EDU!davy From: davy@RIACS.EDU Newsgroups: comp.windows.x Subject: background pixmap in a widget Message-ID: <8812092122.AA04208@intrepid.riacs.edu> Date: 9 Dec 88 21:22:47 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 28 Okay, I made my own widget using the Template widget supplied with R3. The X folks are to be congratulated on this, by the way -- it's well documented, and I had my widget up and running in about 10 minutes. Anyway, I'd like to have my widget come up with a custom background pixmap made from some bitmap data I have. So, I need someplace inside the widget to put the line: pixmap = XCreateBitmapFromData(widget_display, widget_window, bitmap_bits, bitmap_width, bitmap_height); and to set the background pixmap to this. Right now, I have the "expose" part of the ClassRec structure set to my own routine which creates the pixmap from the bitmap and retiles the window the first time it is called. The problem is, this produces a sort of "flash" in the window since it gets mapped with the normal background before I change it to the custom pixmap. So, the question is, where *should* I put this code? I want the widget to create the pixmap, not the application. As near as I can tell, I also need to have this code somewhere where I can use the display and window arguments for the widget. Should I make my own RealizeProc? Is there any documentation on what goes in a RealizeProc? Any ideas? Am I making sense? --Dave Curry