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

David Roundy droundy at darcs.net
Thu Nov 8 14:27:49 EST 2007

On Thu, Nov 01, 2007 at 02:19:43PM -0700, Don Stewart wrote:
> mats:
> > 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.
> > 
> That sounds like you might have identified the problem! We've had other 
> issues with incorrect Word32 use in the bindings. 
> Can someone confirm that this corrects the problem please?

I've got confirmation, and am sending in a pair of patches to XMC to make
it compile with this fix in X11.  I should clarify: with this patch,
avoidStruts works perfectly for me on x86-64.  I haven't tested anything
else that it'd affect.  I think this is enough confirmation (particularly
combined with it's matching with what the X11 library documentation says)
that we should get it in pronto.
David Roundy
Department of Physics
Oregon State University

More information about the Xmonad mailing list