Re: GdbRgb flicker



Jamie Guinan <guinan bluebutton com> writes: 
> It looks like XMoveResizeWindow actually clears the window contents.
> 
> Of course, I would like it to leave the window contents as-is, and just 
> redraw the RGB data over top of whatever was there.

To leave the contents as-is one approach is to call
gdk_window_set_back_pixmap (widget->window, NULL). This means clearing
to background becomes a no-op. However this results in funky artifacts
from time to time, because it also leaves the contents as-is when the
window is exposed the first time while previously obscured, meaning
the window looks "transparent" - so you really only want the NULL
background during the resize...
 
What you really want probably is to set the bit gravity to
NorthWestGravity instead of the 1.2 default (ForgetGravity).  This
means that you avoid the clear-to-background entirely in the resize
case, but clears to background in other cases (e.g. initial window
map) still happen, and the background can still be a solid color
instead of nothing.

However to set the bit gravity you'll need to use Xlib.

> Will Gtk2's non-flicker feature fix this?

Yes. GTK 2 sets bit gravity to NorthWestGravity or StaticGravity, to
avoid the clear on resize, and then it double buffers to avoid
flicker.

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]