#201 closed defect (fixed)
Keyboard doesn't react for java applications
Reported by: | lotan_rm | Owned by: | Antoine Martin |
---|---|---|---|
Priority: | major | Milestone: | 0.8 |
Component: | core | Version: | 0.7.x |
Keywords: | Cc: |
Description
I've tried Xvfb and Xdummy (using the sample configuration xorg.conf).
The mouse reacts as expected.
For native applications keyboard and mouse work as expected.
Attachments (1)
Change History (14)
comment:1 Changed 8 years ago by
Status: | new → accepted |
---|
comment:2 follow-up: 4 Changed 8 years ago by
Got it: this is nothing new and affects all versions.
It's a focus problems which seems to prevent Java applications from gaining the window focus, you can workaround the problem by focusing away then back to the Java application - but even that is not reliable!
comment:3 Changed 8 years ago by
I had a look yesterday as well because I wanted to go back to the last working version in order to have a working keyboard.
To my astonishment the last version I had installed and worked was 0.3.2. That would confirm your observation.
comment:4 Changed 8 years ago by
Replying to antoine:
Got it: this is nothing new and affects all versions.
It's a focus problems which seems to prevent Java applications from gaining the window focus, you can workaround the problem by focusing away then back to the Java application - but even that is not reliable!
I had known that problem as well but it didn't work for me yesterday.
comment:5 Changed 8 years ago by
comment:6 Changed 8 years ago by
More external pointers:
- xmonad does not follow ICCCM and ignores WM_TAKE_FOCUS protocol (Haskell - yuk!)
- qtile focus code (python)
- Keyboard focus lost in Swing applications (ex: Netbeans) after changing to window
Trying to change our code to match those examples does not solve the problem...
comment:7 Changed 8 years ago by
Re #138: I wanted to try to reverse that specific change but the code has changed significantly since then.
One new development: I've played around with the focus and it seems when a dialog window with a textbox comes up the text field won't receive keyboard input. However, when I put the main window into focus, the text field in the dialog does receive keyboard input. So far I haven't found a way to reveive keyboard input in the main window.
comment:8 Changed 8 years ago by
One more datapoint: if I use jdk6 then I have fewer focus problems and even when there are problems, clicking again on the field/area solves it.
Changed 8 years ago by
Attachment: | focus-OK-with-jdk6.patch added |
---|
with this patch - focus works with JDK6
comment:9 Changed 8 years ago by
With JDK6: it may even work without the patch above (not tested), and it definitely works with the patch.
comment:10 Changed 8 years ago by
I can confirm the patch works with sun jdk 6, however it doesn't work server side with jdk7 (icedtea).
comment:11 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
This was all a wild goose chase, found the bug with good old print statements by looking at the "input" member of WMHints
and noticing it was not a boolean... r2003 fixes this.
Will backport to all branches. Please confirm this works for you.
comment:12 Changed 8 years ago by
I can confirm this change works for jdk7 (icedtea) also.
Well done, thank you!
comment:13 Changed 3 months ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/201
Confirmed (tested with jedit). What is a little strange is that I can reproduce this bug with versions as old as 0.3.x, surely it hasn't been broken for that long since I remember testing some java apps (josm) with those releases..