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
--- 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);
}