Ensure the confirmation dialog for closing window is visible to users

FEATURE: 163677
FIXED-IN: 4.9.0
This commit is contained in:
Jekyll Wu
2012-04-21 12:32:22 +08:00
parent 5f3caabae5
commit cf5ccf5f65

View File

@@ -515,6 +515,12 @@ bool MainWindow::queryClose()
return true;
}
// make sure the window is shown on current desktop and is not minimized
KWindowSystem::setOnDesktop(winId(), KWindowSystem::currentDesktop());
if ( isMinimized() ) {
KWindowSystem::unminimizeWindow(winId(), true);
}
int result = KMessageBox::warningYesNoCancel(this,
i18ncp("@info", "There are %1 tab open in this window. "
"Do you still want to quit?",