derf/feh — pull request #138 by rephorm (2013-07-28 07:45:00+00:00)
Title: Fix #137

Compiling feh with -O2 appears to cause the mwmhints struct to get
padded. When casting it to (unsigend char *) and passing that to
XChangeProp, the values were getting corrupted.

For example,
$ feh -x foo.png
$ xprop | grep MOTIF
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0xeb277ce8, 0x838fd4c8, 0x1
^^^^^^^^^^
should be 0

This patch copies the values from the struct into an unsigned char * buffer explicitly.