effects: Include signals notifying about outputs changing
This commit is contained in:
parent
5cc5d81cea
commit
34cfc6680b
4 changed files with 39 additions and 0 deletions
|
@ -232,6 +232,25 @@ Q_SIGNALS:
|
|||
*/
|
||||
void wakeUp();
|
||||
|
||||
/**
|
||||
* Notifies that the output is about to change configuration based on a
|
||||
* user interaction.
|
||||
*
|
||||
* Be it because it gets a transformation or moved around.
|
||||
*
|
||||
* Only to be used for effects
|
||||
*/
|
||||
void aboutToChange();
|
||||
|
||||
/**
|
||||
* Notifies that the output changed based on a user interaction.
|
||||
*
|
||||
* Be it because it gets a transformation or moved around.
|
||||
*
|
||||
* Only to be used for effects
|
||||
*/
|
||||
void changed();
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(AbstractOutput)
|
||||
int m_directScanoutCount = 0;
|
||||
|
|
|
@ -147,6 +147,8 @@ void AbstractWaylandOutput::setSubPixelInternal(SubPixel subPixel)
|
|||
|
||||
void AbstractWaylandOutput::applyChanges(const KWaylandServer::OutputChangeSet *changeSet)
|
||||
{
|
||||
Q_EMIT aboutToChange();
|
||||
|
||||
qCDebug(KWIN_CORE) << "Apply changes to the Wayland output.";
|
||||
bool emitModeChanged = false;
|
||||
bool overallSizeCheckNeeded = false;
|
||||
|
@ -183,6 +185,7 @@ void AbstractWaylandOutput::applyChanges(const KWaylandServer::OutputChangeSet *
|
|||
qCDebug(KWIN_CORE) << "Setting VRR Policy:" << changeSet->vrrPolicy();
|
||||
setVrrPolicy(static_cast<RenderLoop::VrrPolicy>(changeSet->vrrPolicy()));
|
||||
}
|
||||
Q_EMIT changed();
|
||||
|
||||
overallSizeCheckNeeded |= emitModeChanged;
|
||||
if (overallSizeCheckNeeded) {
|
||||
|
|
|
@ -1726,6 +1726,8 @@ EffectScreenImpl::EffectScreenImpl(AbstractOutput *output, QObject *parent)
|
|||
: EffectScreen(parent)
|
||||
, m_platformOutput(output)
|
||||
{
|
||||
connect(output, &AbstractOutput::aboutToChange, this, &EffectScreen::aboutToChange);
|
||||
connect(output, &AbstractOutput::changed, this, &EffectScreen::changed);
|
||||
connect(output, &AbstractOutput::wakeUp, this, &EffectScreen::wakeUp);
|
||||
connect(output, &AbstractOutput::aboutToTurnOff, this, &EffectScreen::aboutToTurnOff);
|
||||
connect(output, &AbstractOutput::scaleChanged, this, &EffectScreen::devicePixelRatioChanged);
|
||||
|
|
|
@ -1873,6 +1873,21 @@ Q_SIGNALS:
|
|||
* This signal is emitted when the device pixel ratio of this screen changes.
|
||||
*/
|
||||
void devicePixelRatioChanged();
|
||||
|
||||
/**
|
||||
* Notifies that the output is about to change configuration based on a
|
||||
* user interaction.
|
||||
*
|
||||
* Be it because it gets a transformation or moved around.
|
||||
*/
|
||||
void aboutToChange();
|
||||
|
||||
/**
|
||||
* Notifies that the output changed based on a user interaction.
|
||||
*
|
||||
* Be it because it gets a transformation or moved around.
|
||||
*/
|
||||
void changed();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue