]> git.lyx.org Git - lyx.git/commitdiff
Fixes this issue:
authorTommaso Cucinotta <tommaso@lyx.org>
Wed, 26 Jan 2011 23:18:36 +0000 (23:18 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Wed, 26 Jan 2011 23:18:36 +0000 (23:18 +0000)
with this sequence:

-) C-N (new doc)
-) C-S-f (open advanced find dialog)
-) Alt-Tab (switch to other application)
-) Alt-Tab (switch back to LyX)

the focus now is on the main document WA. I think it should be back on the Find WA where I was before the Alt-Tab.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37334 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index e28228e84d890fe2251809b509fab285ed87b10c..51b0467decfadd909e1b35c2c4c6ce4d23cac719 100644 (file)
@@ -745,10 +745,10 @@ void GuiView::focusInEvent(QFocusEvent * e)
        QMainWindow::focusInEvent(e);
        // Make sure guiApp points to the correct view.
        guiApp->setCurrentView(this);
-       if (currentMainWorkArea())
-               currentMainWorkArea()->setFocus();
-       else if (currentWorkArea())
+       if (currentWorkArea())
                currentWorkArea()->setFocus();
+       else if (currentMainWorkArea())
+               currentMainWorkArea()->setFocus();
        else
                d.bg_widget_->setFocus();
 }