xpra icon
Bug tracker and wiki

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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)

focus-OK-with-jdk6.patch (4.0 KB) - added by Antoine Martin 8 years ago.
with this patch - focus works with JDK6

Download all attachments as: .zip

Change History (13)

comment:1 Changed 8 years ago by Antoine Martin

Status: newaccepted

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..

Last edited 8 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 8 years ago by Antoine Martin

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 lotan_rm

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 in reply to:  2 Changed 8 years ago by lotan_rm

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 Antoine Martin

A selection of tickets and pointers to related issues:

comment:6 Changed 8 years ago by Antoine Martin

More external pointers:

Trying to change our code to match those examples does not solve the problem...

Last edited 8 years ago by Antoine Martin (previous) (diff)

comment:7 Changed 8 years ago by lotan_rm

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 Antoine Martin

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 Antoine Martin

Attachment: focus-OK-with-jdk6.patch added

with this patch - focus works with JDK6

comment:9 Changed 8 years ago by Antoine Martin

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 lotan_rm

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 Antoine Martin

Resolution: fixed
Status: acceptedclosed

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 lotan_rm

I can confirm this change works for jdk7 (icedtea) also.
Well done, thank you!

Note: See TracTickets for help on using tickets.