effects: Wire EffectsHandler::screenGeometryChanged() to Screens::geometryChanged()
Currently, the EffectsHandler has two signals that are emitted when the combined geometry of all outputs change - virtualScreenGeometryChanged() and screenGeometryChanged(). Having two signals is most likely a historical artifact. This change untangles the screenGeometryChanged() signal from the Workspace and makes it the same as the virtualScreenGeometryChanged() signal.
This commit is contained in:
parent
6c62f12bc1
commit
894ed68ff4
3 changed files with 3 additions and 10 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<EffectsHandlerImpl*>(effects)->desktopResized(geom.size());
|
||||
}
|
||||
}
|
||||
|
||||
void Workspace::saveOldScreenSizes()
|
||||
|
|
Loading…
Reference in a new issue