void MaximizeState::relayout(const QRectF& r, bool animate)
{
	Q_UNUSED(r);
	m_wm->maximizeActiveWindow(animate);
	QRectF boundingRect;

	CardWindow* activeWin = m_wm->activeWindow();
	if(activeWin) {
		if(WindowType::Type_ModalChildWindowCard != activeWin->type()) {
			boundingRect = m_wm->normalOrScreenBounds(activeWin);
			activeWin->setBoundingRect(boundingRect.width(), boundingRect.height());
		}
		else {
			// forward the call to the child.
			activeWin->setBoundingRect(Settings::LunaSettings()->modalWindowWidth, activeWin->boundingRect().height());

			// Notify the parent as well.
			CardWindow* parent = m_wm->modalParent();
			if(parent) {
				boundingRect = m_wm->normalOrScreenBounds(parent);
				parent->setBoundingRect(boundingRect.width(), boundingRect.height());
			}
		}
	}
}