Add support for opacity in ShellClient
parent
f8f13a7fba
commit
ba7c5bbd77
|
@ -266,12 +266,19 @@ NET::WindowType ShellClient::windowType(bool direct, int supported_types) const
|
|||
|
||||
double ShellClient::opacity() const
|
||||
{
|
||||
return 1.0;
|
||||
return m_opacity;
|
||||
}
|
||||
|
||||
void ShellClient::setOpacity(double opacity)
|
||||
{
|
||||
Q_UNUSED(opacity)
|
||||
const qreal newOpacity = qBound(0.0, opacity, 1.0);
|
||||
if (newOpacity == m_opacity) {
|
||||
return;
|
||||
}
|
||||
const qreal oldOpacity = m_opacity;
|
||||
m_opacity = newOpacity;
|
||||
addRepaintFull();
|
||||
emit opacityChanged(this, oldOpacity);
|
||||
}
|
||||
|
||||
void ShellClient::addDamage(const QRegion &damage)
|
||||
|
|
|
@ -170,6 +170,7 @@ private:
|
|||
bool m_fullScreen = false;
|
||||
bool m_transient = false;
|
||||
bool m_internal;
|
||||
qreal m_opacity = 1.0;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue