Re: [dwm] dwm-4.1 / dmenu-3.1

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Tue, 22 May 2007 11:31:56 +0200

On Mon, May 21, 2007 at 10:02:17PM +0200, Szabolcs Nagy wrote:
> >dwm-4.1 contains support for Xrandr-based resizals, several bug
> according to xrandr(3)
> "Clients must call back into Xlib using XRRUpdateConfiguration when
> screen configuration change notify events are generated"
> it works fine for me this way so probably doesn't matter, but this
> suggests to put XRRUpdateConfiguration(e) in configurenotify().

The current solution is independent of Xrandr and does not
depend on the presence of Xrandr extension, so the
XRRUpdateConfiguration() call is not done (also we don't link
against -lXrandr.

> also there is an unnecessary for() in setlayout()
> (well i like lt = layout + i; better than lt = &layout[i];)
>
> diff -r 3ece6b5b9647 layout.c
> --- a/layout.c Mon May 21 14:37:26 2007 +0200
> +++ b/layout.c Mon May 21 21:55:07 2007 +0200
> @@ -198,11 +198,9 @@ setlayout(const char *arg) {
> int i;
>
> if(!arg) {
> - for(i = 0; i < nlayouts && lt != &layout[i]; i++);
> - if(i == nlayouts - 1)
> - lt = &layout[0];
> - else
> - lt = &layout[++i];
> + lt++;
> + if(lt == layout + nlayouts)
> + lt = layout;
> }
> else {
> i = atoi(arg);
>

Applied, thanks for this hint!

Regards,

-- 
 Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361
Received on Tue May 22 2007 - 11:31:56 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:42:04 UTC