[racket] Racket GUI with Xlib

From: Laurent (laurent.orseau at gmail.com)
Date: Tue Nov 27 12:45:48 EST 2012

>> (paramterize ([current-eventspace gui-eventspace]) (queue-callback
> >> (lambda () (send f popup-menu menu2 100 100))))
> >
> >
> > Just did that, and now it says #t for being in the gui-eventspace, but it
> > still has the same behavior otherwise (i.e., the popup menu does not
> show up
> > and then the button does not work anymore).
> Perhaps the handler thread of the gui-eventspace is already busy doing
> something.

Though the behavior is quite consistent and the callbacks are the same, so
I have no clue what could keep it busy.
Are you aware of any important difference between a button callback and a
queue-callback? (the sources are rather obscure)

> >> But probably it would be better to make sure that the callback that is
> >> handling the keystroke be on the gui-eventspace in the first place.
> >
> >
> > I'm not sure what you mean here. Is that different from queue-callback?
> When an event comes into the system it has a frame associated with it,
> from the OS. DrRacket looks at that frame, finds its eventspace, finds
> the main handler thread, and then uses that thread to handle the
> callback. (If you have multiple eventspaces going, it is generally a
> good idea to know which events go to which eventspaces and what
> different eventspaces are doing at different times.)

Ah ok.
The problem is I don't have too much control on most of the frames (it's a
window manager), which are X11 windows (although maybe I could reparent
them to Racket frame%s, but I'm not sure Racket would be too happy if some
of its children are non-racket objects).

Thank you very much, both of you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121127/2f812602/attachment.html>

Posted on the users mailing list.