Introduce a compositingChanged signal in KDecorationOptions
Connected from a signal in DecorationPlugins in KWin core replacing the previous reset method.
This commit is contained in:
parent
69be5b3e25
commit
d29b9bf03a
4 changed files with 9 additions and 10 deletions
|
@ -46,6 +46,7 @@ DecorationPlugin::DecorationPlugin(QObject *parent)
|
|||
#ifdef KWIN_BUILD_DECORATIONS
|
||||
loadPlugin(QString()); // load the plugin specified in cfg file
|
||||
connect(factory(), &KDecorationFactory::recreateDecorations, this, &DecorationPlugin::recreateDecorations);
|
||||
connect(this, &DecorationPlugin::compositingToggled, options, &KDecorationOptions::compositingChanged);
|
||||
#else
|
||||
setDisabled(true);
|
||||
#endif
|
||||
|
@ -134,14 +135,6 @@ Qt::Corner DecorationPlugin::closeButtonCorner()
|
|||
return factory()->closeButtonCorner();
|
||||
}
|
||||
|
||||
void DecorationPlugin::resetCompositing()
|
||||
{
|
||||
if (m_disabled) {
|
||||
return;
|
||||
}
|
||||
factory()->reset(SettingCompositing);
|
||||
}
|
||||
|
||||
QString DecorationPlugin::supportInformation()
|
||||
{
|
||||
if (m_disabled) {
|
||||
|
|
|
@ -50,8 +50,10 @@ public:
|
|||
|
||||
QString supportInformation();
|
||||
|
||||
Q_SIGNALS:
|
||||
void compositingToggled();
|
||||
|
||||
public Q_SLOTS:
|
||||
void resetCompositing();
|
||||
void recreateDecorations();
|
||||
protected:
|
||||
virtual void error(const QString& error_msg);
|
||||
|
|
|
@ -460,6 +460,10 @@ Q_SIGNALS:
|
|||
* some decoration specific settings need to be updated.
|
||||
*/
|
||||
void configChanged();
|
||||
/**
|
||||
* @brief Emitted when the compositing state in KWin core changes.
|
||||
*/
|
||||
void compositingChanged();
|
||||
|
||||
protected:
|
||||
/** @internal */
|
||||
|
|
|
@ -232,7 +232,7 @@ Workspace::Workspace(bool restore)
|
|||
|
||||
m_compositor = Compositor::create(this);
|
||||
connect(this, SIGNAL(currentDesktopChanged(int,KWin::Client*)), m_compositor, SLOT(addRepaintFull()));
|
||||
connect(m_compositor, SIGNAL(compositingToggled(bool)), decorationPlugin(), SLOT(resetCompositing()));
|
||||
connect(m_compositor, &Compositor::compositingToggled, decorationPlugin(), &DecorationPlugin::compositingToggled);
|
||||
|
||||
new DBusInterface(this);
|
||||
|
||||
|
|
Loading…
Reference in a new issue