[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] setting a callback in xlib
From: |
Eduardo Cavazos |
Subject: |
Re: [Chicken-users] setting a callback in xlib |
Date: |
Sat, 07 Mar 2009 19:30:44 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080716 SeaMonkey/1.1.11 |
Eduardo Cavazos <address@hidden> wrote:
In this particular case, like this:
(XSetErrorHandler xerrorhandler)
felix winkelmann wrote:
If you say
(XSetErrorHandler (location xerrorhandler))
does it work, then?
If I install it that way, when I trigger an error this appears in the repl:
callback invoked in non-safe context - execution terminated
Again for reference, below is the code. I installed the error handler by
calling 'install-xerrorhandler-alt'.
Ed
(define-external (xerrorhandler (void* dpy) (void* ev)) int
(display "Error handler called\n"))
(define XSetErrorHandler (foreign-safe-lambda void* XSetErrorHandler
(function int (void* void*))))
(define (install-xerrorhandler-alt)
(XSetErrorHandler (location xerrorhandler)))