zs01+@ANDREW.CMU.EDU (Zalman Stern) (08/01/88)
Is there any way to get the current values for background_pixmap and background_pixel for a window? You can set them, but I don't see a call in the Xlib docs for getting these values. I am trying to fake a save under for a menu package. I have a window that someone asked for a menu to be popped up over. When I bring down the menu window, I want to temporarily set the background_pixmap of the parent window to None, so the server will not redraw the exposed region. Then I can restore the save bits that I have tucked away in a pixmap. The problem is that I can't find out what the current background_pixmap is so I can't restore it when I am done. I would appreciate an answer to this question despite the fact that save unders are going to be implemented in the near future. Please respond via email as I don't read this newsgroup very often. Thank you, Zalman Stern Internet: zs01+@andrew.cmu.edu Usenet: I'm soooo confused... Information Technology Center, Carnegie Mellon, Pittsburgh, PA 15213-3890
swick@ATHENA.MIT.EDU (Ralph R. Swick) (08/01/88)
No. The client is permitted to free the pixmap after creating the window and the server implementation is free to replicate the pixmap in a hardware-optimized fashion. Thus, there is no guarantee that the original resource still exists.
dmg@ADEA-ATT.ARPA (David Gagliano) (08/02/88)
We are having a similar problem, with a pull down menu causing an expose event that makes the exposed window redraw. If we could just save a region of the hidden window's pixmap, do the pulldown, then restore the region, I would avoid the redraw. Of course, since the hidden window can change while my pull-downs are in effect, I may restore bad information. In that case, a full window redraw is appropriate. No clues from the way I've implemented the pull-downs, as the window that gets hidden/exposed is a black-box product; I only have an executable that I'm wrapping the X interface around. - Many Thanks, David M. Gagliano (dmg@adea-att.arpa)
RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (08/08/88)
Date: Sun, 31 Jul 88 23:59:45 -0400 (EDT) From: Zalman Stern <zs01+@andrew.cmu.edu> When I bring down the menu window, I want to temporarily set the background_pixmap of the parent window to None, so the server will not redraw the exposed region. Then I can restore the save bits that I have tucked away in a pixmap. Setting the background to None isn't sufficient, because exposure events will still be generated.