On Sat, Mar 21, 2009 at 11:18 AM, Antoine Martin <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> I don't really understand why this is more proper... but then again, I
> just couldn't get it to work with the _get_rgb_data either!
Yeah, rather than figure out what was going on with that, I attacked
it a little more systematically -- before we were reading the icon off
the window, and then copying it into a server-side chunk of memory
(which makes it fast to render, but xpra doesn't need to render it on
the Xvfb server...). Then _get_rgb_data was copying it back out of the
server, and something was going wrong along the way. So now we read
the icon into our memory and *keep a copy*, and xpra uses that to get
the data to send down the wire.
Also, we were not interpreting alpha icon channels quite correctly
(premultiplied vs. postmultiplied alpha...)
> I noticed:
> surf = window.get_property("icon")
> assert surf.get_format() == cairo.FORMAT_ARGB32
> assert surf.get_stride() == 4 * surf.get_width()
> if surf is not None:
> return {"icon": (surf.get_width(), surf.get_height(),
> "premult_argb32", str(surf.get_data()))
> }
>
> Wouldn't it make sense to have the assert inside the "surf is not None"
> block??
Thanks, good catch!
-- Nathaniel
_______________________________________________
Parti-discuss mailing list
[email protected]
http://lists.partiwm.org/cgi-bin/mailman/listinfo/parti-discuss