private void ensureSubWindowsVisible() {
for (VWindow subWindow : subWindows) {
+ // First process width as it might affect the height
int oldLeft = subWindow.getPopupLeft();
int oldWidth = subWindow.getOffsetWidth();
int oldRight = oldLeft + oldWidth;
if (newLeft < 0) {
newLeft = 0;
subWindow.setWidth(width + "px");
+ subWindow.updateContentsSize();
}
}
+ // Process height once the width is final
int oldTop = subWindow.getPopupTop();
int oldHeight = subWindow.getOffsetHeight();
int oldBottom = oldTop + oldHeight;
if (newTop < 0) {
newTop = 0;
subWindow.setHeight(height + "px");
+ subWindow.updateContentsSize();
}
}