[cairo] cairo / xlib not updating window content

Pavel Petrovic pavel.petrovic.level2 at gmail.com
Sun Jul 29 15:01:34 UTC 2018

Hi Uli,

>> I am also responding to resizing of the window now
>> with resizing back to this fixed size, although I did not go
>> into preventing maximizing, which seems more tricky.
> You are now in violation of ICCCM ยง 4.2.4.

Thank you for pointing it out. It sounds very German.
I was afraid it has something to do with some legal rights.
I have put a line about that into the source.
I will consider that idea one day. :-)
For now, I am happy with a window that keeps its size when somebody
accidentally changes it.

> Also, please take a look at size hints where you can set a maximum and
> minimum size. Setting both to the same value makes the window unresizable.

Yes, maybe, in some window managers, yet, they can maximize,
oh, I do not need perfection here, only something that works for me.
It is a joke that one size fits all in this case paradoxically requires that
one size does not fit all. :-)

> Cedric's solution... I'm not quite sure what it does. It fixes some
> flickering that is not there? It does double buffering, too, but only
> uses a temporary buffer that loses its content afterwards? I felt like
> you want your windows to actually retain old content, which that
> temporary group does not do...

I think that is the magic of the push_group / pop_group that it does
retain the old content. When it is pushed, then a copy is created,
so you add new content to the previous one, and then paint it
back to the visible surface with pop. So both solutions solved
all issues.


More information about the cairo mailing list