[Xmonad] darcs patch: code to define a strut-avoiding layout.

Mats Jansborg mats at jansb.org
Thu Nov 1 17:17:12 EDT 2007


David Roundy <droundy at darcs.net> writes:

> I haven't pushed it, but it requires actual testing by someone for whom the
> strut code doesn't crash xmonad (presumably 32-bit machines will be fine).
> Review would be less helpful than testing.  I can't test it, for obvious
> reasons (and am also less than motivated to perfect it, for the same
> reasons).

I believe the bugs you are experiencing with ManageDocks may be due to
the type of getWindowProperty32 from the X11 library. The documentation
for XGetWindowProperty says:

  If the returned format is 8, the returned data is represented as a
  char array.  If the returned format is 16, the returned data is
  represented as a short array and should be cast to that type to obtain
  the elements.  If the returned format is 32, the returned data is
  represented as a long array and should be cast to that type to obtain
  the elements.

That is, the data is returned as an array of long even when long is not
32 bits wide. My reading of the above is that the return type of
getWindowProperty32 should be changed to 'IO (Maybe [CLong])' and
analogous for getWindowProperty8 and getWindowProperty16 w.r.t. CChar
and CShort. The situation is the same for XChangeProperty, I think.

I haven't tested this at all (neither on 32 nor 64-bit machines), but if
you want, you can check if the attached patches solve the problem.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: property-type-change.dpatch
Type: application/octet-stream
Size: 3239 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20071101/51967409/property-type-change.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clong-property.dpatch
Type: application/octet-stream
Size: 16419 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20071101/51967409/clong-property.obj


More information about the Xmonad mailing list