[Overview][Types][Classes][Procedures and functions][Index] |
X Error Handler.
Source position: os_linux.pas line 107
function MufasaXErrorHandler( |
para1: PDisplay; |
para2: PXErrorEvent |
):cint; |
This is extremely hacky, but also very useful. We have to install a X error handler, because otherwise X will terminate out entire app on error. Since we want the right thread to recieve the right error, we have to fiddle a bit with threadvars, mutexes / semaphores. Another problem is that the script thread is initialised on the main thread. This means that all (threadvar!) semaphores initialised on the mainthread are NOT initialised on the script thread, which has yet to be started. Therefore, we check if it hasn't been created yet. ** Horrible solution, but WFM ** This is the Handler function.