summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moreau <oreaus@gmail.com>2010-02-22 10:55:27 -0700
committerScott Moreau <oreaus@gmail.com>2010-02-22 11:06:09 -0700
commitb5e0fc02322d37ba5d73edc1ab4b8127b3126ff2 (patch)
treec507a97ca8cb3e23ba526a7bd04500dae432c89b
parent4360728006585da95738d2aafda436e0fd8fa148 (diff)
downloadcompiz-core-doc-b5e0fc02322d37ba5d73edc1ab4b8127b3126ff2.tar.gz
compiz-core-doc-b5e0fc02322d37ba5d73edc1ab4b8127b3126ff2.tar.bz2
Properly calculate damage region.
-rw-r--r--plugins/annotate/src/annotate.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/annotate/src/annotate.cpp b/plugins/annotate/src/annotate.cpp
index 3f08929..82484fe 100644
--- a/plugins/annotate/src/annotate.cpp
+++ b/plugins/annotate/src/annotate.cpp
@@ -836,12 +836,14 @@ AnnoScreen::handleMotionEvent (int xRoot,
drawMode == EllipseMode))
{
/* Add border width to the damage region */
- damageRect.setGeometry (damageRect.x () - optionGetStrokeWidth (),
- damageRect.y () - optionGetStrokeWidth (),
+ damageRect.setGeometry (damageRect.x () -
+ (optionGetStrokeWidth () / 2),
+ damageRect.y () -
+ (optionGetStrokeWidth () / 2),
damageRect.width () +
- (optionGetStrokeWidth () * 2),
+ optionGetStrokeWidth () + 1,
damageRect.height () +
- (optionGetStrokeWidth () * 2));
+ optionGetStrokeWidth () + 1);
cScreen->damageRegion (damageRect);
cScreen->damageRegion (lastRect);