Francois.Bitz@SAM.CS.CMU.EDU (05/09/89)
Is there any reason for some member of XSetWindowAttr. not to be present in the WindowAttr. ? It is for example not posssible to find the cursor, foreground, ,... attached to a window, whereas it is possible to find out about border widht for example How would I go about if I wanted to print text in Reverse Video,... in a window without knowing what the foreground/background colors are for the particular window ? thanks
jik@ATHENA.MIT.EDU ("Jonathan I. Kamens") (05/10/89)
Date: 8 May 89 18:59:57 EDT From: Francois.Bitz@sam.cs.cmu.edu How would I go about if I wanted to print text in Reverse Video,... in a window without knowing what the foreground/background colors are for the particular window ? First of all, a window does not have a foreground color associated with it, only a background color. Graphics Contexts are what have foreground colors. Second, presumably you are only going to be drawing in windows that you've created with your application, since it is usually considered somewhat rude to draw in windows that belong to other programs. Since you've created the window, shouldn't you know what its foreground and background colors are? Jonathan Kamens USnail: MIT Project Athena 410 Memorial Drive, No. 223F jik@Athena.MIT.EDU Cambridge, MA 02139-4318 Office: 617-253-4261 Home: 617-225-8218
pds@quintus.UUCP (Peter Schachte) (05/11/89)
In article <8905100036.AA01409@PIT-MANAGER.MIT.EDU> jik@ATHENA.MIT.EDU ("Jonathan I. Kamens") writes: [about why it's not necessary to be able to determine a window's background] >presumably you are only going to be drawing in windows that >you've created with your application, since it is usually considered >somewhat rude to draw in windows that belong to other programs. Since >you've created the window, shouldn't you know what its foreground and >background colors are? Not necessarily. A well-modularized program may want to have a module that takes a window from some other module without having to know anything about it. Perhaps it wants to change its background to red until some circumstance has changed, and then change it back. Or maybe it wants to change the border pattern and change it back later. More likely still, it might want to temporarily change its cursor. Unless I've missed something, none of this is possible. This is one of X11's holes. -- -Peter Schachte pds@quintus.uucp ...!sun!quintus!pds