if (desktop->screenNumber(restoredNormalGeometry.center()) != desktop->screenNumber(this)) { setWindowState(Qt::WindowNoState); // clean internal state setGeometry(restoredNormalGeometry); }