Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ncar!ico!auto-trol!marbru From: marbru@auto-trol.UUCP (Martin Brunecky) Newsgroups: comp.windows.x Subject: Re: Can widget have transparent window? (O'Reilly V4 5.3.8) Keywords: widget Message-ID: <805@auto-trol.UUCP> Date: 2 Sep 90 00:48:11 GMT References: <115@bwilab3.UUCP> Reply-To: marbru@auto-trol.UUCP (Martin Brunecky) Organization: Auto-trol Technology, Denver Lines: 32 In article <115@bwilab3.UUCP> cb@bwilab3.UUCP (CB Genrich) writes: >In O'Reilly "X Toolkit Intrinsics: Programming Manual (Volume Four), >section 5.3.8 (page 156 in my copy), the authors state: > > Background can be a solid color, pattern, or transparent. > >I have tried to get a transparent widget, using code similar to example >5-13, but it is not transparent. > >Any ideas? Please elaborate. > .... lots has been said so far. Yes, you can change any widget's window to be transparent; you just mus realize it, get the window ID (XtWindow(w)), and then change window attributes as you wish. Yes, it is NOT kosher to do it to a poor widget, but unless you mix it with XtSetValues, you may get what you want. Now what you want is a different story. By "transparent" X means that window will retain parent's pixels. This is a little strange definition of transparency, but be it. In addition, any exposure events will be signalled on your "transparent" window, since it obscures (yes, transparent window obscures) the window underneath it. Another special window is an input-only window. This is what it says to be - nothing on the screen, but it can capture any input. -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky marbru@auto-trol.COM (303) 252-2499 {...}ncar!ico!auto-trol!marbru Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404