Bug 853079

Summary: focus problems with openjdk 1.7.0 under gnome3 when selcted keyboard is not the first in keyboard list
Product: [Fedora] Fedora Reporter: Anders Blomdell <anders.blomdell>
Component: java-1.7.0-openjdkAssignee: Mario Torre <neugens>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 17CC: dbhole, jvanek, omajid
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8005018
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-17 16:51:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Small java program demonstarting focus problem none

Description Anders Blomdell 2012-08-30 13:04:38 UTC
Description of problem:

With more than one keyboard installed and any other than the first keyboard active, in the attached java program, all mouse activities are reported against one of the windows.

Version-Release number of selected component (if applicable):

java-1.7.0-openjdk-1.7.0.5-2.2.1.fc17.9.x86_64

How reproducible:

Always


Steps to Reproduce:
1. dconf write /org/gnome/libgnomekbd/keyboard/layouts "['us', 'gb', 'cm']"
2. select "English(UK)" keyboard
3. javac Gnome3Test.java
4. java Gnome3Test
5. Click and drag in 'A' window
6. Click and drag in 'B' window
7. Click and drag in 'A' window
8. Click and drag in 'B' window
9. Place mouse outside 'A' or 'B' window

Actual results:

A{ released moved pressed entered exited dragged }
B{ entered exited }
A{ released moved pressed entered exited dragged }
B{ entered exited }


Expected results:

A{ released moved pressed entered exited dragged }
B{ released moved pressed entered exited dragged }
A{ released moved pressed entered exited dragged }
B{ released moved pressed entered exited dragged }

Additional info:

Comment 1 Anders Blomdell 2012-08-30 13:05:56 UTC
Created attachment 608182 [details]
Small java program demonstarting focus problem

Comment 2 Mario Torre 2012-09-14 11:53:00 UTC
This seems to happen also with Gnome 2.

What I see is that when I can move the A letter but the B letter never moves, is this what you also see?

Comment 3 Anders Blomdell 2012-09-14 12:14:06 UTC
yes (if not clicking in B window,then only B moves).

It also happens over remote X, so my guess is that it stumbles when the key pressed is not in the first four columns of the X-keysym table.

Comment 4 Mario Torre 2012-09-14 12:21:58 UTC
I tried with an older build, and I can confirm this bug.

Comment 5 Mario Torre 2012-09-14 12:27:33 UTC
(In reply to comment #3)
> yes (if not clicking in B window,then only B moves).
> 
> It also happens over remote X, so my guess is that it stumbles when the key
> pressed is not in the first four columns of the X-keysym table.

Yes, quite likely, and is definitely desktop agnostic, since I can also reproduce in KDE.

Comment 6 Mario Torre 2012-11-09 13:57:11 UTC
We found the issue, I started a discussion on the awt-dev mailing list for the possible fix:

http://mail.openjdk.java.net/pipermail/awt-dev/2012-November/003828.html

If you need a fix before it ships into the official repositories (which may require some time), you can apply this patch:

http://cr.openjdk.java.net/~neugens/853079/webrev.01/

Comment 7 Mario Torre 2012-12-17 16:51:12 UTC
Bug has been assigned the following upstream ID:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8000285

The fix has been pushed:

http://hg.openjdk.java.net/jdk8/awt/jdk/rev/a78cb3c5d434

Comment 8 Mario Torre 2012-12-17 16:54:09 UTC
Sorry, wrong link, the bug ID is the following:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8005018

Comment 9 Anders Blomdell 2012-12-18 10:12:14 UTC
Thanks for all the work you all have done!

Comment 10 Mario Torre 2012-12-18 10:38:35 UTC
Sure, no problem! :)