diff options
Diffstat (limited to 'src/if_xcmdsrv.c')
-rw-r--r-- | src/if_xcmdsrv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c index d19f50dd8..ef6e25741 100644 --- a/src/if_xcmdsrv.c +++ b/src/if_xcmdsrv.c @@ -1111,14 +1111,23 @@ GetRegProp(dpy, regPropp, numItemsp, domsg) int result, actualFormat; long_u bytesAfter; Atom actualType; + XErrorHandler old_handler; *regPropp = NULL; + old_handler = XSetErrorHandler(x_error_check); + got_x_error = FALSE; + result = XGetWindowProperty(dpy, RootWindow(dpy, 0), registryProperty, 0L, (long)MAX_PROP_WORDS, False, XA_STRING, &actualType, &actualFormat, numItemsp, &bytesAfter, regPropp); + XSync(dpy, FALSE); + (void)XSetErrorHandler(old_handler); + if (got_x_error) + return FAIL; + if (actualType == None) { /* No prop yet. Logically equal to the empty list */ |