Re: [dwm] regression in 5.0.1

From: Anselm R Garbe <>
Date: Sat, 6 Sep 2008 18:41:57 +0100

2008/9/6 Brendan MacDonell <>:
> On Sat, Sep 6, 2008 at 10:35 AM, bill lam <> wrote:
>> I added that but have no idea where the error log resided.
>> Nevertheless, I simplified that line to
>> if(!XGetWMNormalHints(dpy, c->win, &size, &msize))return;
>> and the issue is also fxied. My theory is that if XGetWMNormalHints
>> fails then information returned in size is rubbish, and set that flag to
>> PSize can help to prevent incorrectly change anything.
> That is pretty much correct. According to the Xlib programming manual:
>> If the property is of type WM_SIZE_HINTS, is of format 32, and is long enough to contain
>> either an old (pre-ICCCM) or new size hints structure, XGetWMNormalHints() sets the
>> various fields of the XSizeHints structure, sets the supplied_return argument to the list of
>> fields that were supplied by the user (whether or not they contained defined values), and
>> returns a nonzero status. Otherwise, it returns a zero status."
> Ie., if a zero status is returned, then the variable size remains
> uninitialized, and will contain whatever garbage was in that stack
> segment when the function was called.

Ok agreed, that's definately a difference. I will commit a patch soon.

Kind regards,
Received on Sat Sep 06 2008 - 17:41:57 UTC

This archive was generated by hypermail 2.2.0 : Sat Sep 06 2008 - 17:48:03 UTC