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

Hi all,
This is an amend-recorded version of my avoidStruts layout
modifier, which crashes on my machine (but probably works
on 32-bit machines). I've just gotten rid of some of the
debug output.
David
Tue Oct 23 18:00:25 EDT 2007 David Roundy

droundy:
Hi all,
This is an amend-recorded version of my avoidStruts layout modifier, which crashes on my machine (but probably works on 32-bit machines). I've just gotten rid of some of the debug output.
David
Tue Oct 23 18:00:25 EDT 2007 David Roundy
* code to define a strut-avoiding layout.
Did you want a review on this? Or have you pushed it already? -- Don

On Wed, Oct 31, 2007 at 01:58:59PM -0700, Don Stewart wrote:
droundy:
This is an amend-recorded version of my avoidStruts layout modifier, which crashes on my machine (but probably works on 32-bit machines). I've just gotten rid of some of the debug output.
David
Tue Oct 23 18:00:25 EDT 2007 David Roundy
* code to define a strut-avoiding layout. Did you want a review on this? Or have you pushed it already?
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). -- David Roundy Department of Physics Oregon State University

David Roundy
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.

mats:
David Roundy
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? -- Don

On Thu, Nov 01, 2007 at 02:19:43PM -0700, Don Stewart wrote:
mats:
David Roundy
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
participants (3)
-
David Roundy
-
Don Stewart
-
Mats Jansborg