I've written a slideshow presenter which displays full screen.

I am using the Swing JWindow class which is a kind of java.awt.Window
and therefore has not titlebar.

I want the <Space> key to advance to the next slide, so I added a
KeyListener to the JWindow. On Win32 this works fine - full screen
slide, no titlebar, <Space> to advance. On Linux I get the full screen
slide, but the KeyListener doesn't get any events.

My first thought was focus differences, so I explicitly set focus (I
tried both requestFocus and grabFocus) no difference.

My only conclusion is the window manager (Window Maker) is not sending
the events because of some window style used by Window/JWindow.

To double check, I tried with Mouse Events. If I have another JFrame
open, the frame can get mouse events, but not the JWindow. As soon as I
close the JFrame the JWindow can get the mouse events, but still no
KeyEvents.

I've even tried using a JFrame shown at negative coords (-Insets.left,
-Insets.top) to clip the titlebar - it refuses to accept negative
coords.

Sorry for the long account. Does anyone have any suggestions for how I
can get a full screen, no titlebar Java canvas on Linux to accept Key
events?

Thanks,
Jon Priddey.
Elixir Technology Pte Ltd.
/* Elixir IDE for Java: http://www.elixir.com.sg/ */

Reply via email to