8026476: Choice does not get mouse events if it does not have enough place for popup menu

Reviewed-by: anthony, serb
This commit is contained in:
Alexander Zvegintsev 2013-10-18 20:35:36 +04:00 committed by Sergey Bylokhov
parent 26158306cd
commit 2861048105

View File

@ -814,12 +814,12 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS
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);
}