I would like to ask XReparentWindow () throwing the wrong BadRequest how to track and debug?

when using the library function XReparentWindow () of x11, the return value is found to be BadRequest (1). The inspection document reveals that XReparentWindow () itself should not return this error, while the official explanation of BadRequest is that the problem may be on the xlib or server side.

how can I check the more specific error log?

Jul.08,2021

after looking at the xlib source code, there is an answer to this question.

The return value of the

xlib function is not an error code. The normal return value of most functions is 1. On the contrary, it is an error when 0 is returned. In this case, error handler should be used to capture and process it.

Menu