diff options
author | faith <faith> | 2002-05-23 14:20:16 +0000 |
---|---|---|
committer | faith <faith> | 2002-05-23 14:20:16 +0000 |
commit | 915434e055bd1848815fcd24030069be33604bd1 (patch) | |
tree | 9da6fa3dfe581c7ec969a24f0543e9f461cbc789 /xc | |
parent | 89a9c822dcd0c939a2fb7ba36f37ad94819415d8 (diff) |
Initialize dmxOldHanlder
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); |