[racket] Fullscreen frame and keyboard focus questions

From: Erich Rast (erich at snafu.de)
Date: Sun Oct 23 11:17:30 EDT 2011

Hi,

I've got a bit of a strange requirement. What I need: a text% with
corresponding editor canvas centered on the screen filled with a
background color or image. Various tools and "overlays" might show up on
the background around the editor. 

Method 1: Make a frame% fullscreen and put vertical and horizontal
panels around the editor canvas. This works but has a few disadvantages
(imagine, e.g., that the background should be a continuous image).

Method 2: Make two frames, one fullscreen for the background and one for
the editor canvas, where the latter has style '(float no-caption). The
result is very much like I want it (especially since the menu is in the
right place), but unfortunately the text% instance never gets the
keyboard focus. Is there a "hack" to force keyboard focus to the editor
embedded in a floating frame? (If it's not set to float the Gnome panel
on Linux will show up even if the background window is right behind it.)

Or, should I rather stick with the first method?

Or, is there a way to paint the background of a frame% directly or
overlay other controls over a canvas?

Any solution needs to work on all platforms.


Best,

Erich





Posted on the users mailing list.