diff options
Diffstat (limited to 'xc')
-rw-r--r-- | xc/programs/Xserver/hw/dmx/dmxprop.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xc/programs/Xserver/hw/dmx/dmxprop.c b/xc/programs/Xserver/hw/dmx/dmxprop.c index 6ba2ac3b3..1acbafc46 100644 --- a/xc/programs/Xserver/hw/dmx/dmxprop.c +++ b/xc/programs/Xserver/hw/dmx/dmxprop.c @@ -43,8 +43,6 @@ extern char *display; -static int (*dmxOldHandler)(Display *, XErrorEvent *); - static int dmxPropertyErrorHandler(Display *dpy, XErrorEvent *ev) { return 0; @@ -68,7 +66,7 @@ void *dmxPropertyIterate(DMXScreenInfo *start, void *closure) { DMXScreenInfo *pt; - + if (!start->next) return f(start, closure); for (pt = start->next; /* condition at end of loop */; pt = pt->next) { @@ -90,6 +88,7 @@ static int dmxPropertyCheckOtherServers(DMXScreenInfo *dmxScreen, Atom atom) char **list = NULL; int count = 0; int i; + int (*dmxOldHandler)(Display *, XErrorEvent *); if (!XGetTextProperty(dpy, DefaultRootWindow(dpy), &tproot, atom) || !tproot.nitems) return 0; @@ -97,7 +96,7 @@ static int dmxPropertyCheckOtherServers(DMXScreenInfo *dmxScreen, Atom atom) /* Ignore BadWindow errors for this * routine because the window id stored * in the property might be old */ - XSetErrorHandler(dmxPropertyErrorHandler); + dmxOldHandler = XSetErrorHandler(dmxPropertyErrorHandler); for (pt = (const char *)tproot.value; pt && *pt; pt = pt ? pt + 1 : NULL) { if ((pt = strchr(pt, ','))) { Window win = strtol(pt+1, NULL, 10); @@ -140,6 +139,7 @@ static DMXScreenInfo *dmxPropertyCheckOtherWindows(DMXScreenInfo *dmxScreen, XTextProperty tproot; XTextProperty tp; const char *pt; + int (*dmxOldHandler)(Display *, XErrorEvent *); if (!XGetTextProperty(dpy, DefaultRootWindow(dpy), &tproot, atom) || !tproot.nitems) return 0; @@ -147,7 +147,7 @@ static DMXScreenInfo *dmxPropertyCheckOtherWindows(DMXScreenInfo *dmxScreen, * routine because the window id stored * in the property might be old */ - XSetErrorHandler(dmxPropertyErrorHandler); + dmxOldHandler = XSetErrorHandler(dmxPropertyErrorHandler); for (pt = (const char *)tproot.value; pt && *pt; pt = pt ? pt + 1 : NULL) { if ((pt = strchr(pt, ','))) { Window win = strtol(pt+1, NULL, 10); |