Re: gdk-pixbuf bug and one-line fix : 86931
- From: Owen Taylor <otaylor redhat com>
- To: Bill Haneman <bill haneman sun com>
- Cc: gtk-devel-list gnome org
- Subject: Re: gdk-pixbuf bug and one-line fix : 86931
- Date: Mon, 1 Jul 2002 09:17:30 -0400 (EDT)
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]