if (!invalidated) return;
invalidated = false;
if (firstWidget instanceof Layout) {
Layout layout = (Layout)firstWidget;
layout.layout();
firstWidget.width = layout.getPrefWidth();
firstWidget.height = layout.getPrefHeight();
}
if (secondWidget instanceof Layout) {
Layout layout = (Layout)secondWidget;