8026476: Choice does not get mouse events if it does not have enough place for popup menu
authorserb
Fri, 18 Oct 2013 20:35:36 +0400
changeset 21267 fe3928f5591f
parent 21266 e061c26c0f50
child 21268 b3298f607368
8026476: Choice does not get mouse events if it does not have enough place for popup menu Reviewed-by: anthony, serb Contributed-by: alexander.zvegintsev@oracle.com
jdk/src/solaris/classes/sun/awt/X11/XChoicePeer.java
--- a/jdk/src/solaris/classes/sun/awt/X11/XChoicePeer.java	Fri Oct 18 15:15:24 2013 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XChoicePeer.java	Fri Oct 18 20:35:36 2013 +0400
@@ -814,12 +814,12 @@
                 x = screen.width - width;
             }
 
+            if (y + height > screen.height) {
+                y = global.y - height;
+            }
             if (y < 0) {
                 y = 0;
             }
-            else if (y + height > screen.height) {
-                y = screen.height - height;
-            }
             return new Rectangle(x, y, width, height);
         }