Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: bizarre behaviour??? Message-ID: <9012091758.AA15812@Larry.McRCIM.McGill.EDU> Date: 9 Dec 90 17:58:59 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 47 > In Xlib, if I create an InputOnly window, [...] I get a transparent > window on which I can select for events and "see through" to the > parent underneath, i.e. I can see text and graphics that are being > drawn dynamically on the parent. Yes. This is just what InputOutput windows are supposed to be. > If I change if from an InputOnly window to an InputOutput window > [...] then, rather than seeing what's on the parent, I get a "hole" > through my application and can see whatever was underneath when the > expose event was received, e.g. root window root-weave, other > applications, etc. This too is working as it's supposed to. More precisely, the "background" of an InputOutput window with background None (which is what you get if you don't specify otherwise) is defined to be "whatever happens to be lying about on that area of the screen". If you map the parent window before mapping the window whose background is None, you'll see that it just leaves the parent's bits untouched instead of the "hole through the application" effect you mentioned. > I'd like to have a transparent InputOutput window. This seems to be a common request. What everybody seems to want is a window that is either transparent (catches events but lets what's behind it show through, even when the stuff in back changes) or nonexistent (neither obscures stuff behind nor catches events), except where something has been drawn on it. Standard X does not provide anything of the sort. The closest suggestion I can make is to use the SHAPE extension to shape the window to fit the graphics. (This gives the second alternative I mentioned above, nonexistence. To get transparency, conver it with an InputOnly window and diddle your event handling.) Unfortunately, changing shapes is typically very slow, so this is practical only when you're doing something whose shape doesn't change often. Of course, if all you want is the "hole through the application" effect, you can just use SHAPE to create a hole in the middle of your top-level window. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu