-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi,
I wanted to add the window icons to the meta data, so I did the following:
_all_metadata = ("title", "size-hints", "class-instance", "icon")
And in _make_metadata I added:
elif propname == "icon":
pixmap=window.get_property("icon")
if pixmap:
w, h = pixmap.get_size()
icon_data = _get_rgb_data(pixmap, 0, 0, w, h)
return {"icon":icon_data}
else:
return {}
Note: had to make the function _get_rgb_data global.
For the client, I added in update_metadata:
if "icon" in self._metadata:
(x, y, width, height, data) = self._metadata["icon"]
rowstride = width*3
pixbuf = gtk.gdk.pixbuf_new_from_data(data,
gtk.gdk.COLORSPACE_RGB, True, 8, width, height, rowstride)
self.set_icon(pixbuf)
It kinda works but the icons don't look quite right!
(too small?)
Any ideas??
Thanks
Antoine
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREKAAYFAkm1bjYACgkQGK2zHPGK1ruRMgCfTwBFDjo5OTaDl4yP3Ed4YFkQ
MhwAni5jLcgCLhGjWLJP9QXhWRiij17w
=FgrM
-----END PGP SIGNATURE-----
_______________________________________________
Parti-discuss mailing list
[email protected]
http://lists.partiwm.org/cgi-bin/mailman/listinfo/parti-discuss