[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kparts
From:       Adam Treat <treat () kde ! org>
Date:       2007-10-01 0:01:39
Message-ID: 1191196899.347192.19465.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 719344 by treat:

* Don't let QMainWindow::restoreState via KMainWindow::applyMainWindowSettings
steal our focus.


 M  +6 -0      mainwindow.cpp  


--- trunk/KDE/kdelibs/kparts/mainwindow.cpp #719343:719344
@@ -123,8 +123,14 @@
     QApplication::sendEvent( part, &ev );
 
     if ( autoSaveSettings() ) {
+        QWidget *focus = QApplication::focusWidget();
         KConfigGroup cg(KGlobal::config(), autoSaveGroup());
         applyMainWindowSettings(cg);
+
+        //The call to applyMainWindowSettings likes to steal focus via the
+        //call to QMainWindow::restoreState.  Don't let it.
+        if (focus)
+            focus->setFocus();
     }
   }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic