[Xcb] [Patch] Improve the _NET_WM_ICON handling in xcb-ewmh

Uli Schlachter psychon at znc.in
Fri Mar 11 03:16:18 PST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi list,

sorry for sending these as attachments, but I am too stupid to configure my
mailer not to break inline patches.

Attached are two (and a half) patch for xcb/util-wm. The first one fixes a too
liberal length check that I noticed while writing the second patch.

The second patch changes the API so that up to 8 icons from _NET_WM_ICON are
returned instead of just the first one.

The last patch is a small test app that I used for making sure the second patch
works right. I ran this again firefox (three icons) and urxvt (no icons) and
asked valgrind to see if anything is wrong.

I don't really like the API change from the second patch, because if a client
has more than 8 icons, the extra icons are silently ignored. However, I didn't
have any idea better idea for this since I wanted to avoid allocating memory in
xcb_ewmh_get_wm_icon_from_reply. If anyone has a good suggestion, please say so.

Cheers,
Uli
- -- 
Sometimes the people that know software the best are the ones
that hate it the most.                                      -- infogulch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBCAAGBQJNegR/AAoJECLkKOvLj8sGW9kH/RzkE2CL1YBN6wvXaVqIhLOy
zfamauBZnM8ApEVCQbkWOva5p2WrSpshc0RXEkgIXer2bWnHbtvY65u5YT1ijnvS
OfrS8fSftKDS1NpBvkkpP3iZtO8XGuKKhzzCTc/od76Z9xYqj7511+cXtxhJDz0K
Bm04eSOQS++VU+eVy0o/nYB37AodDsX1jq8x7fzPFRYnXM+0EQVSW9bkce0LTynK
pcegE3AuFZDpU33KLsc8PWBDJa/OawzNKh5Iic3dThsDtm5gQGCIzBHYth4VriO7
APd56LMI/Zico5JdMdtlPEo1uPtHPyJXG3NSdwNI1R35/14V55YPYhwp9YmlAkY=
=3Xo3
-----END PGP SIGNATURE-----


More information about the Xcb mailing list