Smoother menus
Pavel Roskin
pavel_roskin at geocities.com
Sat May 22 16:59:18 PDT 1999
Hello!
The attached patch changes the reaction of menus on mouse movement in two
ways:
1) Mouse movement is no longer allowed to select a menu if there is no
other selected menu
2) Mouse movement is no longer allowed to deselect a menu
1999-05-23 Pavel Roskin <pavel_roskin at geocities.com>
* libraries/javalib/java/awt/BarMenu.java: mouse movement should
not deselect menus, neither should it select deselected menus.
Pavel Roskin
-------------- next part --------------
--- kaffe/libraries/javalib/java/awt/BarMenu.java Mon Apr 26 10:07:12 1999
+++ kaffe/libraries/javalib/java/awt/BarMenu.java Sun May 23 03:49:56 1999
@@ -207,8 +207,11 @@
MouseMotionAdapter mma = new MouseMotionAdapter() {
public void mouseMoved( MouseEvent evt) {
- if ( (AWTEvent.keyTgt == evt.getSource()) || (current != null) )
- selectMenu( menuAt( evt.getX() ));
+ if (current != null) {
+ Menu m = menuAt( evt.getX() );
+ if (m != null)
+ selectMenu( m);
+ }
}
};
MouseAdapter ma = new MouseAdapter() {
More information about the kaffe
mailing list