[comp.windows.x] XChangeWindowAttributes

fridman@cpsc.ucalgary.ca (fridman) (04/18/91)

It seems that when I execute XChangeWindowAttributes(...) to change
the background pixmap of a window, the effect only takes place after
the window is remapped.

Looking at the source, XChangeWindowAttributes calles _XProcessWindowAttributes
which seems to put the new data into the server and not do anything.

Well, how do I make the change take effect NOW (XFlush won't work) ????

Thanks in advance.

	RF.

klee@wsl.dec.com (Ken Lee) (04/24/91)

In article <FRIDMAN.91Apr17160737@aa.cpsc.ucalgary.ca>, fridman@cpsc.ucalgary.ca (fridman) writes:
|> 
|> It seems that when I execute XChangeWindowAttributes(...) to change
|> the background pixmap of a window, the effect only takes place after
|> the window is remapped.

The background is used for painting the window after exposure.
Try XClearWindow() to force an exposure.

-- 
Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee

mouse@lightning.mcrcim.mcgill.EDU (der Mouse) (05/03/91)

> It seems that when I execute XChangeWindowAttributes(...) to change
> the background pixmap of a window, the effect only takes place after
> the window is remapped.

Or until an exposure is generated some other way.  Two quotes from the
Xlib document:

[after XSetWindowBackground and XSetWindowBackgroundPixmap]

	XSetWindowBackground and XSetWindowBackgroundPixmap do not
	change the current contents of the window.

[under XChangeWindowAttributes]

	Changing the background does not cause the window contents to
	be changed.  To repaint the window and its background, use
	XClearWindow.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu