Commit 7140642d authored by Yuchen Deng's avatar Yuchen Deng Committed by Eike Ziller
Browse files

Fix central Esc handling again

We should to determine the focus widget whether the same,
Sometimes, the widget's sub-window has the real focus.

Change-Id: I0e9128e7d6008e2cb6de681bb0a1a337ad69a230
Reviewed-by: default avatarEike Ziller <>
parent ed63ac27
......@@ -896,7 +896,7 @@ void MainWindow::setFocusToEditor()
// give focus to the editor if we have one
if (IEditor *editor = m_editorManager->currentEditor()) {
if (qApp->focusWidget() != editor->widget()) {
if (qApp->focusWidget() != editor->widget()->focusWidget()) {
focusWasMovedToEditor = editor->widget()->hasFocus();
......@@ -913,7 +913,6 @@ void MainWindow::setFocusToEditor()
if (focusWasMovedToEditor)
// check for some visible bar which we want to hide
bool stuffVisible =
(FindToolBarPlaceHolder::getCurrent() &&
......@@ -932,7 +931,6 @@ void MainWindow::setFocusToEditor()
// switch to edit mode if necessary
void MainWindow::showNewItemDialog(const QString &title,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment