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

List:       kde-commits
Subject:    KDE/kdebase/workspace
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2008-03-24 14:19:40
Message-ID: 1206368380.028835.21708.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 789529 by lunakl:

Re-enable startup suspending in ksmserver and use it while wallpaper
is drawn, to allow fullscreen splashscreens to hide all the initial
plasma flicker.



 M  +2 -1      ksmserver/README  
 M  +0 -7      ksmserver/startup.cpp  
 M  +14 -0     plasma/containments/desktop/desktop.cpp  
 M  +1 -0      plasma/containments/desktop/desktop.h  


--- trunk/KDE/kdebase/workspace/ksmserver/README #789528:789529
@@ -90,7 +90,8 @@
 for the actual visible base components of KDE, i.e. Plasma, in order to make
 the startup appear visually faster. Plasma uses D-Bus calls suspendStartup()
 and resumeStartup() to make ksmserver stay waiting for autostart phase 0
-until Plasma is ready.
+until Plasma is ready (note: suspendStartup() needs to be called before
+the application registers with ksmserver, i.e. before KApplication ctor is called).
 
 Next step is telling the waiting kcminit to perform phase 1 - all kcminit
 modules that should be executed before KDE startup is considered done.
--- trunk/KDE/kdebase/workspace/ksmserver/startup.cpp #789528:789529
@@ -382,12 +382,6 @@
 
 void KSMServer::suspendStartup( const QString &app )
 {
-#if KDE_IS_VERSION( 3, 90, 0 )
-#ifdef __GNUC__
-#warning Re-enable suspend/resume startup and check it works properly.
-#endif
-#endif
-    return;
     if( !startupSuspendCount.contains( app ))
         startupSuspendCount[ app ] = 0;
     ++startupSuspendCount[ app ];
@@ -395,7 +389,6 @@
 
 void KSMServer::resumeStartup( const QString &app )
 {
-    return;
     if( !startupSuspendCount.contains( app ))
         return;
     if( --startupSuspendCount[ app ] == 0 ) {
--- trunk/KDE/kdebase/workspace/plasma/containments/desktop/desktop.cpp \
#789528:789529 @@ -48,6 +48,7 @@
 
 #include "krunner_interface.h"
 #include "screensaver_interface.h"
+#include "ksmserver_interface.h"
 
 #include "backgrounddialog.h"
 
@@ -271,6 +272,7 @@
                           m_wallpaperColor,
                           (Background::ResizeMethod)m_wallpaperPosition,
                           Qt::SmoothTransformation);                       
+    suspendStartup( true ); // during KDE startup, make ksmserver until the \
wallpaper is ready  }
 
 void DefaultDesktop::updateBackground(int token, const QImage &img)
@@ -278,6 +280,7 @@
     if (m_current_renderer_token == token) {
         m_bitmapBackground = QPixmap::fromImage(img);
         update();
+        suspendStartup( false );
     }
 }
 
@@ -314,6 +317,17 @@
     }
 }
 
+void DefaultDesktop::suspendStartup(bool suspend)
+{
+    org::kde::KSMServerInterface ksmserver("org.kde.ksmserver", "/KSMServer", \
QDBusConnection::sessionBus()); +    const QString startupID("desktop wallaper");
+    if (suspend) {
+        ksmserver.suspendStartup(startupID);
+    } else {
+        ksmserver.resumeStartup(startupID);
+    }
+}
+
 void DefaultDesktop::lockScreen()
 {
     if (!KAuthorized::authorizeKAction("lock_screen")) {
--- trunk/KDE/kdebase/workspace/plasma/containments/desktop/desktop.h #789528:789529
@@ -99,6 +99,7 @@
 private:
     void reloadConfig(bool skipUpdates=false);
     QSize resolution() const;
+    void suspendStartup(bool suspend); // for ksmserver
 
     QAction *m_lockDesktopAction;
     QAction *m_appletBrowserAction;


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

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