[racket] Racket GUI with Xlib

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Nov 27 12:05:15 EST 2012

Well, this is one possible way:

(paramterize ([current-eventspace gui-eventspace]) (queue-callback
(lambda () (send f popup-menu menu2 100 100))))

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.

Robby

On Tue, Nov 27, 2012 at 11:00 AM, Laurent <laurent.orseau at gmail.com> wrote:
>
>>
>> >> Is the callback than handles the c-f1 keystroke running in
>> >> gui-eventspace or in some other eventspace?
>> >
>> >
>> > It's in the gui-eventspace (just checked with a printf and a comparison
>> > with
>> > `(eq? (current-eventspace) gui-eventspace)'), and so is the button
>> > callback.
>>
>> Not that I doubt your answer, but the telltale test is not that one, but:
>>
>> (eq? (current-thread) (eventspace-handler-thread gui-eventspace))
>
>
> Aha!
> With that test, it says yes for the button callback, and no for the C-F1
> callback.
> (good thing I wrote my test above, then)
>
> So how can I make sure that the C-F1 callback is handled by the
> gui-eventspace?
>
> Laurent

Posted on the users mailing list.