-----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!
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??
Antoine
Nathaniel Smith wrote:
> Okay, I just added icon support (in a somewhat more proper way). Seems
> to work for me, let me know if you have any problems...
>
> -- Nathaniel
>
> On Tue, Mar 10, 2009 at 1:37 AM, Antoine Martin <[email protected]> wrote:
>> Nathaniel Smith wrote:
>>> On Tue, Mar 10, 2009 at 12:33 AM, Antoine Martin <[email protected]>
>>> wrote:
>>>>>> pixbuf = gtk.gdk.pixbuf_new_from_data(data,
>>>>>> gtk.gdk.COLORSPACE_RGB, True, 8, width, height, rowstride)
>>>>> Does it help to put 'False' as the 3rd argument instead?
>>>> OMG... it does!
>>>>
>>>> We lose transparency, but I think it's good enough as it is (better than
>>>> nothing)
>>>> Will send a patch shortly.
>>> Transparency is easy... the problem is just that _get_rgb or whatever
>>> it's called is fetching the pixmap data without transparency (b/c for
>>> ordinary windows alpha is a waste of space) -- you can tell because it
>>> passes False as the 3rd argument -- and the two calls have to match.
>>> Just use True on both sides and transparency will work.
>> Hah, yes, pretty obvious really!
>>
>> Except... it doesn't seem to work!
>> Cumulative patch attached (adds has_alpha flag to _get_rgb)
>> Looks like the server is not sending the alpha channel??
>>
>> Antoine
>>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREKAAYFAknFL3UACgkQGK2zHPGK1rtXbACfdH5iZVcZbyMWDCcmekdXy0+A
tCcAn2h4n8CAzY01m5AFfz7oI2Qx5q9B
=28R2
-----END PGP SIGNATURE-----
_______________________________________________
Parti-discuss mailing list
[email protected]
http://lists.partiwm.org/cgi-bin/mailman/listinfo/parti-discuss