Bug 27780 - Swing menus are not selected on mouse button release
Summary: Swing menus are not selected on mouse button release
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: 0.93
Assignee: Roman Kennke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-27 21:21 UTC by pere
Modified: 2006-10-13 17:28 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-10-10 19:45:20


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pere 2006-05-27 21:21:13 UTC
When using the menu while running the openjump program with jamvm and
the CVS version of GNU Classpath, I see this problem with the menus.

When I press down the mouse button on for example the File menu and
move the mouse down to the "New project..." menu option before I
release the mouse button, nothing happen.  I have to click one extra
time on "New project..." to select it.  When using the SUN JDK, the
entry is selected when I release the mouse button the first time.

This problem might be related to bug #26583.  I am not sure, as I do
not understand that bug report fully.
Comment 1 cvs-commit@developer.classpath.org 2006-10-13 08:52:01 UTC
Subject: Bug 27780

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Changes by:	Roman Kennke <rabbit78>	06/10/13 08:51:30

Modified files:
	javax/swing    : JMenuItem.java 
	javax/swing/plaf/basic: BasicMenuItemUI.java 
	.              : ChangeLog 

Log message:
	2006-10-13  Roman Kennke  <kennke@aicas.com>
	
		PR 27780
		* javax/swing/JMenuItem.java
		(isDragging): New field. Indicates if we are inside a mouse
		drag.
		(createMenuDragMouseEvent): Removed unneeded method.
		(processMenuDragMouseEvent): Track if we are dragging.
		(processMouseEvent): Simply forward to processMenuDragMouseEvent().
		* javax/swing/plaf/basic/BasicMenuItemUI.java
		(MenuDragMouseHandler.menuDragMouseDragged): Fetch
		MenuSelectionManager from event.
		(MenuDragMouseHandler.menuDragMouseEntered): Fetch
		MenuSelectionManager from event.
		(MenuDragMouseHandler.menuDragMouseExited): Fetch
		MenuSelectionManager from event.
		(MenuDragMouseHandler.menuDragMouseReleased): Click on mouse
		release inside menu item, otherwise clear selection.
		(MenuInputHandler.mouseReleased): Avoid multiple calls to getX()
		and getY(). Call doClick() rather than the doClick() of JMenuItem.
		(doClick): Perform an immediate click.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/JMenuItem.java?cvsroot=classpath&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicMenuItemUI.java?cvsroot=classpath&r1=1.52&r2=1.53
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.8673&r2=1.8674



Comment 2 Thomas Fitzsimmons 2006-10-13 14:29:25 UTC
I can't reproduce this bug on the reference implementation.  Pere, can you provide more details on how to reproduce this?
Comment 3 Thomas Fitzsimmons 2006-10-13 15:18:48 UTC
(In reply to comment #2)
> I can't reproduce this bug on the reference implementation.  Pere, can you
> provide more details on how to reproduce this?

Nevermind, I had misconfigured the Mauve Harness and was running Roman's test on the wrong VM.
Comment 4 Roman Kennke 2006-10-13 17:28:11 UTC
This is fixed in CVS.