6888634: test/closed/javax/swing/Popup/TaskbarPositionTest.java fails
Reviewed-by: alexp
This commit is contained in:
parent
ba42773298
commit
e7fc59fe99
@ -359,17 +359,20 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement {
|
||||
int scrBottomY = scrBounds.y + scrHeight;
|
||||
|
||||
// Ensure that popup menu fits the screen
|
||||
if (popupRightX > (long)scrRightX) {
|
||||
if (popupRightX > (long) scrRightX) {
|
||||
popupLocation.x = scrRightX - popupSize.width;
|
||||
if( popupLocation.x < scrBounds.x ) {
|
||||
popupLocation.x = scrBounds.x ;
|
||||
}
|
||||
}
|
||||
if (popupBottomY > (long)scrBottomY) {
|
||||
|
||||
if (popupBottomY > (long) scrBottomY) {
|
||||
popupLocation.y = scrBottomY - popupSize.height;
|
||||
if( popupLocation.y < scrBounds.y ) {
|
||||
popupLocation.y = scrBounds.y;
|
||||
}
|
||||
}
|
||||
|
||||
if (popupLocation.x < scrBounds.x) {
|
||||
popupLocation.x = scrBounds.x;
|
||||
}
|
||||
|
||||
if (popupLocation.y < scrBounds.y) {
|
||||
popupLocation.y = scrBounds.y;
|
||||
}
|
||||
|
||||
return popupLocation;
|
||||
|
Loading…
x
Reference in New Issue
Block a user