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

Brian Mattern rephorm at rephorm.com
Sun Jul 28 12:01:57 EDT 2013


On Sun, 28 Jul 2013, Jim Rees wrote:

> Brian Mattern wrote:
> 
>   It turns out that it is a genuine bug in feh that is triggered when gcc
>   optimizations are turned on. (I happened to recompile without
>   optimization, and thus saw the bug disappear.)
> 
> Your fix might work for you, but that's just by accident. You have only
> filled the first five bytes of a message that's 20 bytes long, and the other
> 15 bytes are whatever garbage happens to be on the stack.


You're right (so much for a quick fix after midnight).

However, it turns out that your fix (simply memsetting mwmhints) *also*
works just by accident.

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.

The fact that the struct is uninitialized is perhaps bad form, but not
incorrect (flags is initialized plus anything set in flags).

Thanks for correcting my late night silliness!

Brian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: feh-mwmhints2.patch
Type: text/x-diff
Size: 818 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20130728/d3f1004f/attachment.patch>


More information about the openbox mailing list