[openbox] Feh Borderless - Anyone Achieved This In Openbox?

Brian Mattern rephorm at rephorm.com
Sun Jul 28 13:50:39 EDT 2013


On Sun, 28 Jul 2013, Jim Rees wrote:

> Brian Mattern wrote:
>   
>   The correct fix is attached. On 64-bit machines, X apparently means
>   "long" when it says "32", and NOT 32 bits. So, it actually expects 40
>   bytes of data to be passed.
> 
> That doesn't make sense. Openbox has its own definition of mwmhints, and the
> elements are declared as guint, which is an unsigned int. I wonder if
> openbox is doing the right thing.

The manpage for XChangeProperty states:

  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 specified format is 32, the property data must be a long array.

It may be unintuitive and perhaps a bit silly, but it is what it is.

You can also look at get_all() in openbox/obt/prop.c, which casts the
data to gulong and then copies the value into a guint32.
(get_all() gets called by OBT_PROP_GETA32() in client_get_mwm_hints() in openbox/openbox/client.c)

> 
> Also I'd be much happier if you left the memset in.

The code is correct either way, so I'm ambivalent. But, I'll add it in
for good form.


More information about the openbox mailing list