aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2011-09-26 13:01:05 (GMT)
committerThomas Lübking <thomas.luebking@gmail.com>2011-10-10 18:51:26 (GMT)
commit5980946806a09ce44ad2015ac7f6be56b6b68f88 (patch)
tree3963cfa0724ba23761f533f80d490e2036171c34
parentfefb77d1c3adae671e54ac563d3ebd74a5ffb479 (diff)
fix xrender scale+shadowed toplevel geometry
REVIEW: 102703 FIXED-IN: 4.7.3
-rw-r--r--kwin/scene_xrender.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/kwin/scene_xrender.cpp b/kwin/scene_xrender.cpp
index 8ed6f07..0bf604d 100644
--- a/kwin/scene_xrender.cpp
+++ b/kwin/scene_xrender.cpp
@@ -645,10 +645,11 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
Client *client = dynamic_cast<Client*>(toplevel);
Deleted *deleted = dynamic_cast<Deleted*>(toplevel);
+ const QRect decorationRect = toplevel->decorationRect();
if (client && Workspace::self()->decorationHasAlpha())
- transformed_shape = QRegion(client->decorationRect());
+ transformed_shape = decorationRect;
else if (deleted && Workspace::self()->decorationHasAlpha())
- transformed_shape = QRegion(deleted->decorationRect());
+ transformed_shape = decorationRect;
else
transformed_shape = shape();
@@ -662,7 +663,7 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
}
};
- XTransform identity = {{
+ static XTransform identity = {{
{ XDoubleToFixed(1), XDoubleToFixed(0), XDoubleToFixed(0) },
{ XDoubleToFixed(0), XDoubleToFixed(1), XDoubleToFixed(0) },
{ XDoubleToFixed(0), XDoubleToFixed(0), XDoubleToFixed(1) }
@@ -737,12 +738,10 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
}
//END OF STUPID RADEON HACK
}
-
#define MAP_RECT_TO_TARGET(_RECT_) \
if (blitInTempPixmap) _RECT_.translate(-decorationRect.topLeft()); else _RECT_ = mapToScreen(mask, data, _RECT_)
//BEGIN deco preparations
- QRect decorationRect;
bool noBorder = true;
const QPixmap *left = NULL;
const QPixmap *top = NULL;
@@ -758,7 +757,6 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
right = client->rightDecoPixmap();
bottom = client->bottomDecoPixmap();
client->layoutDecorationRects(dlr, dtr, drr, dbr, Client::WindowRelative);
- decorationRect = client->decorationRect();
}
if (deleted && !deleted->noBorder()) {
noBorder = deleted->noBorder();
@@ -767,7 +765,6 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
right = deleted->rightDecoPixmap();
bottom = deleted->bottomDecoPixmap();
deleted->layoutDecorationRects(dlr, dtr, drr, dbr);
- decorationRect = deleted->decorationRect();
}
if (!noBorder) {
MAP_RECT_TO_TARGET(dtr);