Re: [dwm] checkotherwm() simplification

From: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Sat, 6 Sep 2008 09:00:06 +0100

Applied

Thank you!

2008/9/4 Martin Hurton <martin.hurton_AT_gmail.com>:
> Hi,
>
> The patch below changes the checkotherwm() function so that the xerrorlib
> is initialised before changing the error handler, not after. Please comment.
>
> /Martin
>
>
> diff -r 8a9a1dbeff49 dwm.c
> --- a/dwm.c Tue Sep 02 22:36:06 2008 +0100
> +++ b/dwm.c Thu Sep 04 12:23:51 2008 +0200
> @@ -337,15 +337,14 @@
> void
> checkotherwm(void) {
> otherwm = False;
> - XSetErrorHandler(xerrorstart);
> + xerrorxlib = XSetErrorHandler(xerrorstart);
>
> /* this causes an error if some other window manager is running */
> XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask);
> XSync(dpy, False);
> if(otherwm)
> die("dwm: another window manager is already running\n");
> - XSetErrorHandler(NULL);
> - xerrorxlib = XSetErrorHandler(xerror);
> + XSetErrorHandler(xerror);
> XSync(dpy, False);
> }
>
>
>

-- 
--Anselm
Received on Sat Sep 06 2008 - 08:00:06 UTC

This archive was generated by hypermail 2.2.0 : Sat Sep 06 2008 - 08:12:04 UTC