shod

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 5091f8cafd069f478f5dfc4e2e611cb81f5d50eb
parent 024929a4911dadd920e2a23d67c4aed8df238bd0
Author: Lucas de Sena <lucas@seninha.org>
Date:   Sat, 14 Jan 2023 17:09:59 -0300

fix #28

The call to XSetErrorHandler with xerror is already done at
checkotherwm; removing it from main().

Diffstat:
Mshod.c | 5++---
Mxutil.c | 6------
Mxutil.h | 3---
3 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/shod.c b/shod.c @@ -278,10 +278,10 @@ autostart(char *filename) static void checkotherwm(void) { - (void)XSetErrorHandler(xerrorstart); + xerrorxlib = XSetErrorHandler(xerrorstart); XSelectInput(dpy, root, ROOT_EVENTS); XSync(dpy, False); - XSetErrorHandler(xerror); + (void)XSetErrorHandler(xerror); XSync(dpy, False); } @@ -346,7 +346,6 @@ main(int argc, char *argv[]) xinit(); checkotherwm(); xinitvisual(); - xiniterrfunc(xerror, &xerrorxlib); XrmInitialize(); xrm = XResourceManagerString(dpy); setresources(xrm); diff --git a/xutil.c b/xutil.c @@ -260,9 +260,3 @@ xinitvisual(void) colormap = DefaultColormap(dpy, screen); } } - -void -xiniterrfunc(XErrorFunc xerror, XErrorFunc *xerrorxlib) -{ - *xerrorxlib = XSetErrorHandler(xerror); -} diff --git a/xutil.h b/xutil.h @@ -73,8 +73,6 @@ enum { ATOM_LAST }; -typedef int (*XErrorFunc)(Display *, XErrorEvent *); - extern Visual *visual; extern Colormap colormap; extern unsigned int depth; @@ -99,5 +97,4 @@ Atom getatomprop(Window win, Atom prop); void initatoms(void); void initatom(int atomenum); void xinit(void); -void xiniterrfunc(XErrorFunc, XErrorFunc *); void xinitvisual(void);