JDK-8013429 : Swing apps stop accepting keyboard input when run over X Windows
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7u15
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2013-03-01
  • Updated: 2014-11-17
  • Resolved: 2013-05-22
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description
FULL PRODUCT VERSION :
java version  " 1.7.0_15 " 
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux jack 2.6.32-279.22.1.el6.x86_64 #1 SMP Sun Jan 13 09:21:40 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
Have seen on older versions of RHEL as well.

A DESCRIPTION OF THE PROBLEM :
Have tried Xming, Mocha X Server, and MobaXterm to locally (Windows 7) display Swing apps running on remote Linux servers.  This has been working fine for several years under Java 1.5 and Java 1.6.

Under Java 1.7, the Swing app displays, but no keyboard entry works.  This occurs with standard JFC demo apps like SwingSet2 and Notepad so is not an application issue.

Sometimes keyboard entry works briefly, but seems to subsequently stop working after, for example, popping up a dialog.  Any time focus changes to a different application window, keyboard i/o (including cursor keys, tabbing between fields, etc.) stops working.  Clicking in a JTextField does not place a cursor in the field.  Mouse events continue to work as expected.

Note that the problem only seems to occur when the X Windows server is configured to open individual local windows for each window the remote app creates.  If you configure Xming or other server  to open one shared window, everything seems to work fine.

Also not that I have set DISPLAY to point to an X Windows desktop on a Solaris system and did NOT see this problem.  Perhaps all of the MS Windows X Windows servers I have tried share common XFree86 code that the Solaris implementation doesn't use?

REGRESSION.  Last worked in version 6u31

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install Xming or other MS Windows X Windows server and configure so that each remote application window is opened in its own window.

Run SwingSet2.

Change tabs a few times.  Go to the dialogs tab and click  " Show Input Dialog " .  Go back to the leftmost tab and try to edit the Frame title that defaults to  " Frame " .  You will not be able to.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should be able to edit  " Frame " .  Cursor should appear.  Left and right cursor keys should move the cursor.  You should be able to use the delete key or backspace key to delete.  You should be able to type in a new name.  None of these things occur.
ACTUAL -
All controls seem to ignore the keyboard - none of them ever seem to get focus and you cannot even tab from one to the next.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
No crash.  No error messages are displayed.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
See source for standard Java JFC Notepad demo application.  Run java -jar Notepad.jar and try to type something into it.
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Configuring the X Windows server to open a single shared window seems to work.  However, this is a severe error because numerous clients are currently using our software and all use X Windows to run it from their desktops.
Comments
I've checked (with Xming on Win7) that the fix for JDK-8009224.fixes this issue.
22-05-2013

Could be related to JDK-8009224.
30-04-2013