wm-spec broken?



I'm currently implementing the _NET_WM_ICON part of the wm-spec, and I'm
having problems deciphering the spec.

Here is what is says:
--------------------------------
_NET_WM_ICON

 _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. First two bytes are width, height. Data is in rows, left to
right and top to bottom. 
---------------------------------

This seems to say I should pack my data like this: 
 a << 24 | r << 16 | g << 8 | b
in host byte-order, and this will be byteswapped to network byte-order
by xlib.

It also says that the first two *bytes* are width and height. How can I
pack two bytes before an array of 32 bit integers and expect byte-swapping
to work?

/ Alex







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]