Re: [gtk-list] Re: REFCOUNTING and Pixmaps with XEvents




Tim Janik <Tim.Janik@Hamburg.Netsurf.DE> writes:

> hm, i think this states otherwise.
> you can copy from a pixmap to a pixmap, or even a window to a pixmap,
> and in fact this can cause GraphicsExpose events.

You're obviously right about what it says. I guess I need to go take
Remedial Reading.

> > So I think we are OK,
> >                                         Owen
> > 
> 
> so i think we aren't...

Well, we aren't too bad off:

To get an error, the programmer has to:

  Enable graphics exposes on the GC.
  Copy [window/pixmap] -> pixmap
  Copy off the edge of the source drawable or from an obscured window.
  Then get rid of the last reference to the pixmap before they get the
    GraphicsExpose events.

And the result is only a warning on the screen. (And it might be
argued that the programmer _has_ made an error here.)  The correct way
to fix things up is probably just too ignore events for which the
window is set to an unknown xid. (Our pixmap's ID after it has been
deleted). We can't do the same thing we do for windows, because we
won't get the equivalent of a DestroyNotify event.

Regards.
                                        Owen



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