[cairo] cairo and gdk/X11

Tamas K Papp tpapp at Princeton.EDU
Tue Jun 12 06:46:47 PDT 2007


On Tue, Jun 12, 2007 at 03:58:16PM +0300, Kalle Vahlman wrote:

> >This is really neat.  It almost works now, except that Damage events
> >are not received when the window is passive, only when I click on it:
> >then the window gets an expose event and a damage event immediately
> >after.  Suggestions would be appreciated, I attached the C code.
> 
> So the code you attached is run in one thread and another thread draws
> to the cairo context you create? Otherwise it naturally won't damage
> the pixmap...

Yes, the function attached is run in a thread, which returns the
context via context_pointer, and another thread draws on that.

Strangely, DamageNotify and even DestroyNotify events only arrive when
the window gets focus, not until then.  For example, I send a
DestroyNotify from the other thread, but the window won't be destroyed
until it gets focus.

Thanks,

Tamas


More information about the cairo mailing list