fix shadow fix
(cherry picked from commit 55986b32de9e5f5f66ac0c3448b26863cfc2dee0)
This commit is contained in:
parent
de0a1406a0
commit
f0492f9b02
6 changed files with 15 additions and 22 deletions
1
client.h
1
client.h
|
@ -419,7 +419,6 @@ public:
|
||||||
WindowRelative // Relative to the top left corner of the window
|
WindowRelative // Relative to the top left corner of the window
|
||||||
};
|
};
|
||||||
void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom, CoordinateMode mode) const;
|
void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom, CoordinateMode mode) const;
|
||||||
virtual void addRepaintFull();
|
|
||||||
|
|
||||||
TabBox::TabBoxClientImpl* tabBoxClient() const {
|
TabBox::TabBoxClientImpl* tabBoxClient() const {
|
||||||
return m_tabBoxClient;
|
return m_tabBoxClient;
|
||||||
|
|
|
@ -750,10 +750,7 @@ void Toplevel::addRepaint(int x, int y, int w, int h)
|
||||||
|
|
||||||
void Toplevel::addRepaintFull()
|
void Toplevel::addRepaintFull()
|
||||||
{
|
{
|
||||||
repaints_region = rect();
|
repaints_region = decorationRect();
|
||||||
if (hasShadow()) {
|
|
||||||
repaints_region = repaints_region.united(shadow()->shadowRegion());
|
|
||||||
}
|
|
||||||
workspace()->checkCompositeTimer();
|
workspace()->checkCompositeTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -842,11 +839,6 @@ bool Client::shouldUnredirect() const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::addRepaintFull()
|
|
||||||
{
|
|
||||||
repaints_region = decorationRect();
|
|
||||||
workspace()->checkCompositeTimer();
|
|
||||||
}
|
|
||||||
|
|
||||||
//****************************************
|
//****************************************
|
||||||
// Unmanaged
|
// Unmanaged
|
||||||
|
@ -885,10 +877,5 @@ bool Deleted::shouldUnredirect() const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Deleted::addRepaintFull()
|
|
||||||
{
|
|
||||||
repaints_region = decorationRect();
|
|
||||||
workspace()->checkCompositeTimer();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
#include "shadow.h"
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
@ -139,7 +140,11 @@ void Deleted::layoutDecorationRects(QRect& left, QRect& top, QRect& right, QRect
|
||||||
|
|
||||||
QRect Deleted::decorationRect() const
|
QRect Deleted::decorationRect() const
|
||||||
{
|
{
|
||||||
return rect().adjusted(-padding_left, -padding_top, padding_top, padding_bottom);
|
QRect r(rect());
|
||||||
|
r.adjust(-padding_left, -padding_top, padding_top, padding_bottom);
|
||||||
|
if (hasShadow())
|
||||||
|
r |= shadow()->shadowRegion().boundingRect();
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect Deleted::transparentRect() const
|
QRect Deleted::transparentRect() const
|
||||||
|
|
|
@ -57,7 +57,6 @@ public:
|
||||||
return no_border;
|
return no_border;
|
||||||
}
|
}
|
||||||
void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const;
|
void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const;
|
||||||
virtual void addRepaintFull(); // in composite.cpp
|
|
||||||
QRect decorationRect() const;
|
QRect decorationRect() const;
|
||||||
protected:
|
protected:
|
||||||
virtual void debug(QDebug& stream) const;
|
virtual void debug(QDebug& stream) const;
|
||||||
|
|
|
@ -98,6 +98,14 @@ QDebug& operator<<(QDebug& stream, const ConstToplevelList& list)
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QRect Toplevel::decorationRect() const
|
||||||
|
{
|
||||||
|
QRect r(rect());
|
||||||
|
if (hasShadow())
|
||||||
|
r |= shadow()->shadowRegion().boundingRect();
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
void Toplevel::detectShape(Window id)
|
void Toplevel::detectShape(Window id)
|
||||||
{
|
{
|
||||||
is_shape = Extensions::hasShape(id);
|
is_shape = Extensions::hasShape(id);
|
||||||
|
|
|
@ -285,11 +285,6 @@ inline QRect Toplevel::rect() const
|
||||||
return QRect(0, 0, width(), height());
|
return QRect(0, 0, width(), height());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline QRect Toplevel::decorationRect() const
|
|
||||||
{
|
|
||||||
return rect();
|
|
||||||
}
|
|
||||||
|
|
||||||
inline QRegion Toplevel::decorationPendingRegion() const
|
inline QRegion Toplevel::decorationPendingRegion() const
|
||||||
{
|
{
|
||||||
return QRegion();
|
return QRegion();
|
||||||
|
|
Loading…
Reference in a new issue