[cairo] Avoiding flicker when resizing an Xlib program
Bill Purvis
bill at billp.org
Tue Sep 10 21:13:22 UTC 2019
On 10/09/2019 21:52, Adam Jackson wrote:
> On Tue, 2019-09-10 at 09:49 +0100, Bill Purvis wrote:
>
>> I've found that when I resize a window I get terrible flickering - it
>> appears to rewrite the
>> window contents in black before allowing me to repaint my content.
> The default "bit gravity" for X windows is "ForgetGravity", which means
> the server can (and aggressively does) discard window contents whenever
> the window's size changes. Most toolkits set this to NorthWestGravity
> instead, which will attempt to preserve the pixels in the top-left
> (northwest) corner of the window, and will only fill in newly exposed
> areas in the bottom and right with the background pixel.
>
> - ajax
Thanks, that's a useful pointer. I'd either forgotten about that, or
maybe I never
thought about it. Must be old age!
Bill
--
+----------------------------------------+
| Bill Purvis |
| email: bill at billp.org |
+----------------------------------------+
More information about the cairo
mailing list