diff options
author | fvogel <fvogelnew1@free.fr> | 2018-01-31 07:25:33 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2018-01-31 07:25:33 (GMT) |
commit | 8471a1b1adb4226c7ce6da5d2d669dd111d06d0c (patch) | |
tree | d4c2399ed84a8920c331fd15e5125d81a26119ef /unix | |
parent | 1f9d432d73243ec954f8545ea669c22e28e70fd3 (diff) | |
download | tk-8471a1b1adb4226c7ce6da5d2d669dd111d06d0c.zip tk-8471a1b1adb4226c7ce6da5d2d669dd111d06d0c.tar.gz tk-8471a1b1adb4226c7ce6da5d2d669dd111d06d0c.tar.bz2 |
Patch refinement from Christian Werner. It is now possible to 'make test' with an untrusted X connection without being stopped by X errors (and of course with more failures due to the untrusted connection).
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tkUnixSend.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index 95e5ae2..4dc1bf3 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -1969,6 +1969,7 @@ TkpTestsendCmd( "bogus", "prop", "serial", NULL }; TkWindow *winPtr = clientData; + Tk_ErrorHandler handler; int index; if (objc < 2) { @@ -1982,11 +1983,14 @@ TkpTestsendCmd( return TCL_ERROR; } if (index == TESTSEND_BOGUS) { + handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, -1, -1, -1, + NULL, NULL); XChangeProperty(winPtr->dispPtr->display, RootWindow(winPtr->dispPtr->display, 0), winPtr->dispPtr->registryProperty, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "This is bogus information", 6); + Tk_DeleteErrorHandler(handler); } else if (index == TESTSEND_PROP) { int result, actualFormat; unsigned long length, bytesAfter; @@ -2025,7 +2029,10 @@ TkpTestsendCmd( XFree(property); } } else if (Tcl_GetString(objv[4])[0] == 0) { + handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, + -1, -1, -1, NULL, NULL); XDeleteProperty(winPtr->dispPtr->display, w, propName); + Tk_DeleteErrorHandler(handler); } else { Tcl_DString tmp; @@ -2037,9 +2044,12 @@ TkpTestsendCmd( } } + handler = Tk_CreateErrorHandler(winPtr->dispPtr->display, + -1, -1, -1, NULL, NULL); XChangeProperty(winPtr->dispPtr->display, w, propName, XA_STRING, 8, PropModeReplace, (unsigned char*)Tcl_DStringValue(&tmp), p-Tcl_DStringValue(&tmp)); + Tk_DeleteErrorHandler(handler); Tcl_DStringFree(&tmp); } } else if (index == TESTSEND_SERIAL) { |