kdeplasma-addons: do not suspend startup from virus wallpaper

done by plasma-desktop itself, see:
kde-workspace/plasma/shells/plasma-desktop/plasmaapp.cpp

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-08-31 19:51:02 +03:00
parent b510355f1b
commit 246f75dd09
3 changed files with 1 additions and 35 deletions

View file

@ -8,12 +8,6 @@ set(virus_SRCS
itemsview.cpp
)
if(KDE4WORKSPACE_FOUND)
add_definitions(-DHAVE_KWORKSPACE)
set(ksmserver_xml ${KDE4_DBUS_INTERFACES_INSTALL_DIR}/org.kde.KSMServerInterface.xml)
qt4_add_dbus_interface(virus_SRCS ${ksmserver_xml} ksmserver_interface)
endif()
kde4_add_plugin(plasma_wallpaper_virus ${virus_SRCS})
target_link_libraries(plasma_wallpaper_virus
KDE4::plasma

View file

@ -26,18 +26,13 @@
#include "backgroundlistmodel.h"
#include "backgrounddelegate.h"
#if defined(HAVE_KWORKSPACE)
# include "ksmserver_interface.h"
#endif
K_EXPORT_PLASMA_WALLPAPER(virus, Virus)
Virus::Virus(QObject *parent, const QVariantList &args)
: Plasma::Wallpaper(parent, args),
m_configWidget(0),
m_model(0),
m_dialog(0),
m_startupResumed(false)
m_dialog(0)
{
connect(this, SIGNAL(renderCompleted(QImage)), this, SLOT(updateBackground(QImage)));
connect(&alife, SIGNAL(finished()), this, SLOT(virusUpdated()));
@ -405,7 +400,6 @@ void Virus::renderWallpaper(const QString& image)
}
render(m_img, m_size, m_resizeMethod, m_color);
suspendStartup(true); // during KDE startup, make ksmserver until the wallpaper is ready
}
QString Virus::cacheId() const
@ -422,26 +416,6 @@ void Virus::updateBackground(const QImage &img)
emit update(boundingRect());
}
void Virus::suspendStartup(bool suspend)
{
#if defined(HAVE_KWORKSPACE)
if (m_startupResumed) {
return;
}
org::kde::KSMServerInterface ksmserver("org.kde.ksmserver", "/KSMServer", QDBusConnection::sessionBus());
const QString startupID("desktop wallpaper");
if (suspend) {
ksmserver.suspendStartup(startupID);
} else {
m_startupResumed = true;
ksmserver.resumeStartup(startupID);
}
#else
Q_UNUSED(suspend);
#endif // HAVE_KWORKSPACE
}
void Virus::updateScreenshot(QPersistentModelIndex index)
{
m_uiVirus.m_view->update(index);

View file

@ -61,7 +61,6 @@ class Virus : public Plasma::Wallpaper
void fillMetaInfo(Plasma::Package *b);
bool setMetadata(QLabel *label, const QString &text);
void renderWallpaper(const QString& image = QString());
void suspendStartup(bool suspend); // for ksmserver
void calculateGeometry();
void setSingleImage();
QString cacheId() const;
@ -84,7 +83,6 @@ class Virus : public Plasma::Wallpaper
QSize m_size;
QString m_img;
QDateTime m_previousModified;
bool m_startupResumed;
QTimer m_timer;