tags:

views:

340

answers:

1

I'm using a pixmap as a window's backup in order to restore it under expose events. When the window is resized, must I resize the backup pixmap?

If so, what is the best way? Create a new pixmap with the new size?

+2  A: 

Yes you are right.

If the window is resized to a smaller size you just clip it.

If the window is bigger you allocate again to the new size.

My advice would also be to look at

  • xcb which replaces xlib at the moment
  • xshm functions for faster performance
  • Xrender/cairo/clutter that may do what you want already
kazanaki