Allow Client to disable the rendering of DecorationShadow
For maximized and fullscreen windows we don't want the shadow to be renderer at all.
This commit is contained in:
parent
08d146de91
commit
98a5c4e050
5 changed files with 17 additions and 1 deletions
|
@ -736,6 +736,11 @@ void Client::checkNoBorder()
|
|||
setNoBorder(app_noborder);
|
||||
}
|
||||
|
||||
bool Client::wantsShadowToBeRendered() const
|
||||
{
|
||||
return !isFullScreen() && maximizeMode() != KDecorationDefines::MaximizeFull;
|
||||
}
|
||||
|
||||
void Client::updateShape()
|
||||
{
|
||||
if (shape()) {
|
||||
|
|
1
client.h
1
client.h
|
@ -605,6 +605,7 @@ public:
|
|||
|
||||
bool decorationHasAlpha() const;
|
||||
bool isClientSideDecorated() const;
|
||||
bool wantsShadowToBeRendered() const override;
|
||||
|
||||
Position titlebarPosition() const;
|
||||
|
||||
|
|
|
@ -826,7 +826,7 @@ WindowQuadList Scene::Window::buildQuads(bool force) const
|
|||
}
|
||||
|
||||
}
|
||||
if (m_shadow) {
|
||||
if (m_shadow && toplevel->wantsShadowToBeRendered()) {
|
||||
ret << m_shadow->shadowQuads();
|
||||
}
|
||||
effects->buildQuads(toplevel->effectWindow(), ret);
|
||||
|
|
|
@ -347,6 +347,11 @@ const Shadow *Toplevel::shadow() const
|
|||
}
|
||||
}
|
||||
|
||||
bool Toplevel::wantsShadowToBeRendered() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void Toplevel::getWmOpaqueRegion()
|
||||
{
|
||||
const int length=32768;
|
||||
|
|
|
@ -301,6 +301,11 @@ public:
|
|||
* Call this method when the Property changes or Compositing is started.
|
||||
**/
|
||||
void getShadow();
|
||||
/**
|
||||
* Whether the Toplevel currently wants the shadow to be rendered. Default
|
||||
* implementation always returns @c true.
|
||||
**/
|
||||
virtual bool wantsShadowToBeRendered() const;
|
||||
|
||||
/**
|
||||
* This method returns the area that the Toplevel window reports to be opaque.
|
||||
|
|
Loading…
Reference in a new issue