Menu

#3 KDE4 plasma interaction problem

2.0
open
xbee
None
2013-04-20
2012-01-20
xbee
No

SyncWall don't work directly with KDE4. We have to use a workaround for it.

Discussion

  • Mhn

    Mhn - 2013-01-03

    After using this software together with KDE4 using the workaround with multiple screens, I experienced a problem.
    Almost at each change of wallpaper either one or both of the wallpapers are completely black.
    After verifying that the temporary files were correct I realized it might be a timing issue.

    After investigating I have found that:
    - The method to save images used in SyncWall now, fails.
    - "mv dynamic_wallpaper0.png wallpaper_kde0.png && mv dynamic_wallpaper1.png wallpaper_kde1.png", and pointing kde to respective target file, fails.
    - "mv dynamic_wallpaper0.png newfile0.png && sleep 0.5 && mv dynamic_wallpaper1.png newfile1.png", works.
    - The method to save images used in SyncWall now, but with a sleep between wallpapers, fails.

    I've created an (ugly) patch that works for me, it simply moves the temporary files to a new location after creation with a sleep inbetween each file.

    I also refined the KDE4 detection in the process, since it wrongly detected KDE3.

    --- SystemIntegration.cpp   2013-01-03 12:11:38.488014962 +0100
    +++ SystemIntegration.cpp.new   2013-01-03 12:11:25.784468506 +0100
    @@ -147,22 +147,24 @@
    
                 case DESKTOP_KDE4:
                 {
    +
    +                QString bgpath;
    +                QString command;
    +
                     int screen = 0;
    -                foreach(const QImage&img, imgs)
    +               foreach(const QImage&img, imgs)
    +                {
                         bgImg = convertImage(img,"PNG",screen++);
    +                    bgpath = QDir::toNativeSeparators( MiscFunctions::getValidStorage() + "/dynamic_wallpaper_kde4_" +  QString::number(screen) + ".png" );
    +                    command += "mv " + bgImg + " " + bgpath;
    +                    if (screen < imgs.size()) command += " && sleep 1 && ";
    +                }
    
    -                //1 = none
    -                //2 = tiled
    -                //3 = center tiled
    -                //4 = centered
    -                //5 = scaled
    -                //6 = stretched
    -                QString wmode = "1";
    -                job.args << "kdesktop" << "KBackgroundIface" << "setWallpaper" << "1" << bgImg << wmode;
    -                job.command = "dbus";
    +                job.args << "-c" << command;
    +                job.command = "sh";
    
    -                //m_cmdQueue.enqueue(job);
    -                LogHandler::getInstance()->reportWarning( tr("KDE4 is currently incompletely supported. Please select %1 as the current wallpaper with \"centered\" parameter (it's just a workaround)").arg(bgImg) );
    +                m_cmdQueue.enqueue(job);
    +                LogHandler::getInstance()->reportWarning( tr("KDE4 is currently incompletely supported. Please select %1 as the current wallpaper with \"centered\" parameter (it's just a workaround)").arg(bgpath) );
    
                     break;
                 }
    @@ -592,7 +594,8 @@
             if (ok)
             {
                 if ( QFileInfo(file.peekNext().absoluteFilePath() + "/exe").symLinkTarget().contains("kdeinit") &&
    -                 !QFileInfo(file.peekNext().absoluteFilePath() + "/exe").symLinkTarget().contains("kdeinit4") )
    +                 !QFileInfo(file.peekNext().absoluteFilePath() + "/exe").symLinkTarget().contains("kdeinit4")&&
    +                 !QFileInfo(file.peekNext().absoluteFilePath() + "/exe").symLinkTarget().contains("kde4") )
                 {
                     LogHandler::getInstance()->reportDebug( tr("detectCurrentDesktop => Detected: KDE3") );
                     temp = DESKTOP_KDE3;
    
     

    Last edit: Mhn 2013-01-03
  • xbee

    xbee - 2013-04-20
    • Milestone: 1.3 --> 2.0
     

Log in to post a comment.