Merge branch 'Plasma/5.15'
This commit is contained in:
commit
50041fd5f9
4 changed files with 7 additions and 11 deletions
|
@ -201,6 +201,8 @@ void Compositor::slotCompositingOptionsInitialized()
|
|||
}
|
||||
}
|
||||
|
||||
emit aboutToToggleCompositing();
|
||||
|
||||
auto supportedCompositors = kwinApp()->platform()->supportedCompositors();
|
||||
const auto userConfigIt = std::find(supportedCompositors.begin(), supportedCompositors.end(), options->compositingMode());
|
||||
if (userConfigIt != supportedCompositors.end()) {
|
||||
|
@ -373,6 +375,8 @@ void Compositor::finish()
|
|||
m_finishing = true;
|
||||
m_releaseSelectionTimer.start();
|
||||
|
||||
emit aboutToToggleCompositing();
|
||||
|
||||
// Some effects might need access to effect windows when they are about to
|
||||
// be destroyed, for example to unreference deleted windows, so we have to
|
||||
// make sure that effect windows outlive effects.
|
||||
|
@ -1192,9 +1196,6 @@ bool Client::setupCompositing()
|
|||
if (!Toplevel::setupCompositing()){
|
||||
return false;
|
||||
}
|
||||
if (isDecorated()) {
|
||||
decoratedClient()->destroyRenderer();
|
||||
}
|
||||
updateVisibility(); // for internalKeep()
|
||||
return true;
|
||||
}
|
||||
|
@ -1203,11 +1204,6 @@ void Client::finishCompositing(ReleaseReason releaseReason)
|
|||
{
|
||||
Toplevel::finishCompositing(releaseReason);
|
||||
updateVisibility();
|
||||
if (!deleting) {
|
||||
if (isDecorated()) {
|
||||
decoratedClient()->destroyRenderer();
|
||||
}
|
||||
}
|
||||
// for safety in case KWin is just resizing the window
|
||||
resetHaveResizeEffect();
|
||||
}
|
||||
|
|
|
@ -176,6 +176,7 @@ public Q_SLOTS:
|
|||
Q_SIGNALS:
|
||||
void compositingToggled(bool active);
|
||||
void aboutToDestroy();
|
||||
void aboutToToggleCompositing();
|
||||
void sceneCreated();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -87,10 +87,9 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D
|
|||
&Decoration::DecoratedClientImpl::signalShadeChange);
|
||||
connect(client, &AbstractClient::keepAboveChanged, decoratedClient, &KDecoration2::DecoratedClient::keepAboveChanged);
|
||||
connect(client, &AbstractClient::keepBelowChanged, decoratedClient, &KDecoration2::DecoratedClient::keepBelowChanged);
|
||||
connect(Compositor::self(), &Compositor::aboutToToggleCompositing, this, &DecoratedClientImpl::destroyRenderer);
|
||||
m_compositorToggledConnection = connect(Compositor::self(), &Compositor::compositingToggled, this,
|
||||
[this, decoration]() {
|
||||
delete m_renderer;
|
||||
m_renderer = nullptr;
|
||||
createRenderer();
|
||||
decoration->update();
|
||||
}
|
||||
|
|
|
@ -95,7 +95,6 @@ public:
|
|||
Renderer *renderer() {
|
||||
return m_renderer;
|
||||
}
|
||||
void destroyRenderer();
|
||||
KDecoration2::DecoratedClient *decoratedClient() {
|
||||
return KDecoration2::DecoratedClientPrivate::client();
|
||||
}
|
||||
|
@ -107,6 +106,7 @@ private Q_SLOTS:
|
|||
|
||||
private:
|
||||
void createRenderer();
|
||||
void destroyRenderer();
|
||||
AbstractClient *m_client;
|
||||
QSize m_clientSize;
|
||||
Renderer *m_renderer;
|
||||
|
|
Loading…
Reference in a new issue