diff --git a/src/effects.cpp b/src/effects.cpp index 2ef07965ae..abdc85e6e8 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -191,6 +191,9 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene) connect(Screens::self(), &Screens::countChanged, this, &EffectsHandler::numberScreensChanged); connect(Screens::self(), &Screens::sizeChanged, this, &EffectsHandler::virtualScreenSizeChanged); connect(Screens::self(), &Screens::geometryChanged, this, &EffectsHandler::virtualScreenGeometryChanged); + connect(Screens::self(), &Screens::geometryChanged, this, [this]() { + Q_EMIT screenGeometryChanged(Screens::self()->size()); + }); #ifdef KWIN_BUILD_ACTIVITIES if (Activities *activities = Activities::self()) { connect(activities, &Activities::added, this, &EffectsHandler::activityAdded); @@ -781,11 +784,6 @@ bool EffectsHandlerImpl::hasKeyboardGrab() const return keyboard_grab_effect != nullptr; } -void EffectsHandlerImpl::desktopResized(const QSize &size) -{ - Q_EMIT screenGeometryChanged(size); -} - void EffectsHandlerImpl::registerPropertyType(long atom, bool reg) { if (reg) diff --git a/src/effects.h b/src/effects.h index f2aefdb4a1..683da8a74b 100644 --- a/src/effects.h +++ b/src/effects.h @@ -187,7 +187,6 @@ public: void startPaint(); void grabbedKeyboardEvent(QKeyEvent* e); bool hasKeyboardGrab() const; - void desktopResized(const QSize &size); void reloadEffect(Effect *effect) override; QStringList loadedEffects() const; diff --git a/src/workspace.cpp b/src/workspace.cpp index 18c7c5bbad..906fb5d4a7 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -2069,10 +2069,6 @@ void Workspace::desktopResized() // TODO: emit a signal instead and remove the deep function calls into edges and effects ScreenEdges::self()->recreateEdges(); - - if (effects) { - static_cast(effects)->desktopResized(geom.size()); - } } void Workspace::saveOldScreenSizes()