Xpra: Ticket #201: Keyboard doesn't react for java applications

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.



Tue, 30 Oct 2012 08:38:11 GMT - Antoine Martin: status changed

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


Tue, 30 Oct 2012 09:03:40 GMT - 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!


Tue, 30 Oct 2012 09:06:40 GMT - 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.


Tue, 30 Oct 2012 09:07:37 GMT - 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.


Tue, 30 Oct 2012 09:16:52 GMT - Antoine Martin:

A selection of tickets and pointers to related issues:


Tue, 30 Oct 2012 11:02:17 GMT - Antoine Martin:

More external pointers:

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


Tue, 30 Oct 2012 13:11:07 GMT - 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.


Tue, 30 Oct 2012 13:16:26 GMT - 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.


Tue, 30 Oct 2012 13:21:52 GMT - Antoine Martin: attachment set

with this patch - focus works with JDK6


Tue, 30 Oct 2012 13:22:31 GMT - Antoine Martin:

With JDK6: it may even work without the patch above (not tested), and it definitely works with the patch.


Tue, 30 Oct 2012 13:59:51 GMT - lotan_rm:

I can confirm the patch works with sun jdk 6, however it doesn't work server side with jdk7 (icedtea).


Tue, 30 Oct 2012 15:19:14 GMT - Antoine Martin: status changed; resolution set

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.


Tue, 30 Oct 2012 16:41:48 GMT - lotan_rm:

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


Sat, 23 Jan 2021 04:48:17 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/201