Bug 355571

Summary: Lightweight Components Respond Strangely to Mouse Events
Product: [Fedora] Fedora Reporter: Jeff Gold <fedora>
Component: java-1.5.0-gcjAssignee: Thomas Fitzsimmons <fitzsim>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 7   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-02 21:59:58 UTC Type: ---
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
Simplistic Applet/Application that demonstrates the problem.
none
Simplistic web page to demonstrate problem as an Applet none

Description Jeff Gold 2007-10-28 02:02:35 UTC
I will attach Dots.java and dots.html as soon as I have filed this bug. 
Dots.java is an Applet that contains an instance of LightDots, which extends
Component and is therefore a Lightweight Component, and HeavyDots, which extends
Canvas and so isn't.  Both are otherwise essentially identical.  They draw a
filled oval in either blue or red, depending on their state.  Each mouseReleased
event they receive toggles that state.

When I try this in Firefox using gcjwebplugin the HeavyDots instance is
clickable while the LightDots instance seems to ignore all events.  However, the
static main method of Dots adds the same components to a Frame instead of an
Applet and both instances respond to clicks.  For some reason the lightweight
component also responds when clicking on the heavyweight component in that case.

I tried this same simplistic applet against the Sun Java plugin on WindowsXP and
found exactly the behavior I would expect.  Clicking either side works and
toggles only that side.

Version-Release: java-1.5.0-gcj-1.5.0.0-14.fc7
How reproducible: Always
Steps to Reproduce:
1. javac Dots.java
2. firefox dots.html
3. java Dots
  
Actual results: No response to mouse clicks on the left side when in applet form
and overzealous response on the left side to clicks on the right when used
within a Frame.

Expected results:  Toggle only the side clicked, just as can be seen with the
Sun JDK on WindowsXP.

Comment 1 Jeff Gold 2007-10-28 02:04:21 UTC
Created attachment 240791 [details]
Simplistic Applet/Application that demonstrates the problem.

Comment 2 Jeff Gold 2007-10-28 02:05:54 UTC
Created attachment 240801 [details]
Simplistic web page to demonstrate problem as an Applet

Comment 3 Thomas Fitzsimmons 2008-04-02 21:59:58 UTC
Use OpenJDK instead.  I tested this in applet and application form on i386
Rawhide against these packages:

java-1.6.0-openjdk-1.6.0.0-0.7.b08.fc9
java-1.6.0-openjdk-plugin-1.6.0.0-0.7.b08.fc9

and it worked fine.  (Actually I modified dots.html to use the applet tag
instead of the object tag.)

Comment 4 Jeff Gold 2008-04-03 00:45:03 UTC
Fair enough.  Thanks.