Re: gdk-pixbuf bug and one-line fix : 86931



Thanks Owen:

With regard to your question about using 'normal gdk', I'd love to, but
it's not clear how at the moment.  The source of the pixels is not on
the default screen. Erwann is away now, or I'd have asked him already
;-)

What's the API for getting the root GdkWindow of the non-default screen?

thanks

- Bill

On Mon, 2002-07-01 at 14:17, Owen Taylor wrote:
> 
> Bill Haneman <bill haneman sun com> writes:
> 
> > Hi:
> > 
> > gdk_pixbuf_xlib_get_from_drawable() (in contrib) currently won't work if
> > the drawable you pass in is the root window.  This turns out to be
> > solely because of a broken sanity check assertion which expects the
> > 'parent' of the drawable to be non-null.
> > 
> > The code runs fine with the following one-line patch, which allows the
> > test to succeed of the drawable passed in is the same as the root window
> > returned from the XQueryTree in xlib_window_is_viewable().
> > 
> > May I please commit?  Fixing this will let me kill about 1000 lines of
> > nasty cut-and-paste code in module gnome-mag...
> 
> Yes, this looks fine to commit. (Both branches.)
> 
>  But:
> 
>  a) We really should remove the assertion check; assertion
>     checks should *never* check things that the programmer
>     has no control over; a window could become not-visible
>     at any time.
> 
>     (The original check in GDK is less broken since
>     it only tests GDK's local idea of viewability, which
>     should never change without running the main loop.)
> 
>  b) Why aren't you using normal GDK for this? 
>     gdk_pixbuf_xlib is unmaintained and unsupported
>     and doesn't contain a considerable number of fixes
>     that are found in the main codebase. Plus. 
>     it's get-from-drawable is accelerated using shared
>     pixmaps when possible.
> 
> Regards,
>                                         Owen
> 





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