2008/10/28 Frank Schmitt <[EMAIL PROTECTED]>:
> Marc Lehmann <[EMAIL PROTECTED]> writes:
>
>> On Mon, Oct 27, 2008 at 12:46:53PM +0100, Frank Schmitt <[EMAIL PROTECTED]>
>> wrote:
>>> > - the code seems to be broken - _NET_WM_ICON expects cardinals, and thus
>>> > an array of longs, but you seem to pass in two int's followed by bytes?
>>> > you would need to fix this.
>>>
>>> I'm rather sure this is correct. The arguments are two integers
>>> specifying width and height of the image followed by the image data, 4
>>> bytes per Pixel (ARGB). However I will have one more look at it.
>>
>> The point is that cardinals are specified using *longs*, while you
>> currently pass in *ints*. longs have 64 bits on current hardware, ints
>> have 32 bits, so the property would end up corrupted.
>
> Hello Marc
>
> I looked at the standard at
> http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html#id2523482
> again and it explicitly says in the last paragraph 32 bit:
>
> ,----
> | NET_WM_ICON CARDINAL[][2+n]/32
> |
> | This is an array of possible icons for the client. This specification
> | does not stipulate what size these icons should be, but individual
> | desktop environments or toolkits may do so. The Window Manager MAY scale
> | any of these icons to an appropriate size.
> |
> | This is an array of 32bit packed CARDINAL ARGB with high byte being A,
> | low byte being B. The first two cardinals are width, height. Data is in
> | rows, left to right and top to bottom.
> `----
>
> Do you have any other sources for me which contradict this?
The property is indeed a 32bit packed array, but there is still this
bit from XChangeProperty(3):
If the specified format is 8, the property data must be a char
array. If the
specified format is 16, the property data must be a short
array. If the speci-
fied format is 32, the property data must be a long array.
Ie, what Marc said.
--
Mikael Magnusson
(sorry for the most likely horrible gmail wrapping of the man quote)
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode