Subject: FVWM: Strange behaviour of ClickToFocus and Java AWT...

From: "Ripalda-Marin, Miguel-Angel" <[email-masked]>
Date: Sat, 25 Aug 2001 12:15:13 +0100

Hi everybody,

I have noticed a strange behaviour of my java apps when working over FVWM,
maybe it is a little bit off-topic because has much to do with Java, but I
would like to know I somebody has noted this problem before and whether
theres a workaorund or something I am doing wrong... it looks like follows:

I have stablished ClickToFocus in my .fvwm2rc, whose content is this:
- BEGIN OF .FVWM2RC -
DeskTopSize 1x1

# Default Styles:
Style "*"           BorderWidth 0, HandleWidth 0, notitle, nohandles
Style "*"           NoPPosition, ClickToFocus
GlobalOpts ClickToFocusDoesntRaise

# Some simple default mouse bindings:
#   for the root window:
Mouse 1 R N -
Mouse 2 R N -
Mouse 3 R N -

# Initialization function
AddToFunc InitFunction    "I" Module FvwmEvent
+ "I" exec xsetroot -solid Black
- END OF .FVWM2RC -

ok... I launch also two apps from my InitFunction, one xterm and a java app,
but I doesn't seem to be relevant. The thing is that whenever I have
'native' apps, like two xterms, ClickToFocus works perfectly. But I my java
apps happens the following: if I have in the window of my java app one
JPanel (Swing) with several swing JComponents and one Panel (AWT) with AWT
Components I click on the swing components and start to write text...
everything works OK. But if I MOVE (not click) the mouse pointer to the AWT
panel, I cannot keep on editing, because my keystrokes are lost. The other
way seems to work OK: I can click one AWT Component to set the focus and
type-in my text, it doesn't matter if I move the mouse pointer to the swing
JPanel (as far as I don't click on it)... I can keep on editing in my AWT
Component.

Once again, I think I has something to do with the way the JVM treats the
AWT Components (everyone has a native window as peer, I think)... but maybe
somebody has come through this problem yet, and has found any workaround...
It would be great.

Thanks in advance and best regards,

Miguel Ángel Ripalda

Computer Engineer
[email-masked]

P.S. I have tried over my linux box with RedHat 7.0 and FWVM 2.2.4 with Java
IBM JDK 1.1.8 and 1.3... and will try now with the blackdown port of JDK
1.1.8.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].