Closed bw31642 closed 1 year ago
I am not sure why this is a bug. Returning -1 indicates there is something wrong with the system, and we should not proceed with using the package. Are you saying that without loading libX11.so, the package can still work as expected?
I'm saying the test in the function clipboard_test() of clipboard_linux.c needs a 0 to get to the return -1. 0 is the only value that means false. int clipboard_test() { if (!initX11()) { <----------- This needs a return value of 0 to get to the return -1 return -1; } If you test the code when libX11.so is not available, you can observe the error.
make initX11() return 0 in the event of dlopen failing. This allows the test for failure in clipboard_test() to work as expected.