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