[racket] Racket GUI with Xlib

From: Laurent (laurent.orseau at gmail.com)
Date: Sun Nov 25 11:32:29 EST 2012

Hi all,

I'm trying to use Racket's GUI while using Jon's Xlib bindings inside my
racket window manager, but there seems to be a resource conflict.

Let the following standard module code:
#lang racket/gui
(define f (new frame% [label "Test Frame"]))
(define bt (new button% [parent f][label "Hide me"]
                [callback (λ _ (send f show #f))]))
(send f show #t)

If I run this code from a keybinding or from the client console directly
inside RWind, the frame and the button show up, and I can hide the frame
with another keybinding or from the console.
However I cannot click the button with the mouse or with the keyboard.
If I run this code inside a thread, same problem.
The frame looks completely frozen, like a still image.

But if I run the same code from a terminal, in a separate racket instance,
everything works fine.

I guess Racket's GUI is doing some stuff that may be incompatible as is
with my program, but I'm not sure what. The fact that the frame can be
shown or hidden makes me doubt that's it's an issue with event processing.

Does this ring a bell to someone, or does anyone have an idea that could
help me solve this?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121125/d7075ed1/attachment.html>

Posted on the users mailing list.