summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/group
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-19 12:20:05 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-19 12:20:05 +0000
commit743330688620622cd95b22ba14e1b686d3bc7310 (patch)
tree0203c73ec1cef2827f9f635f54dba19405a0edc3 /beryl-plugins/src/group
parent89c35e20d22c744fd11dbbfc6c31b289273d3cea (diff)
downloadmarex-dev-743330688620622cd95b22ba14e1b686d3bc7310.tar.gz
marex-dev-743330688620622cd95b22ba14e1b686d3bc7310.tar.bz2
group plugin: fix damage region being too small (closes #852)
git-svn-id: file:///beryl/trunk@2889 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/group')
-rw-r--r--beryl-plugins/src/group/selection.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/beryl-plugins/src/group/selection.c b/beryl-plugins/src/group/selection.c
index 453e2d5..65d25ee 100644
--- a/beryl-plugins/src/group/selection.c
+++ b/beryl-plugins/src/group/selection.c
@@ -324,18 +324,21 @@ groupDamageSelectionRect(CompScreen* s, int xRoot, int yRoot)
reg.rects = &reg.extents;
reg.numRects = 1;
- reg.extents.x1 = MIN(gs->x1, gs->x2) - 1;
- reg.extents.y1 = MIN(gs->y1, gs->y2) - 1;
- reg.extents.x2 = MAX(gs->x1, gs->x2) + 1;
- reg.extents.y2 = MAX(gs->y1, gs->y2) + 1;
+ /* we damage the selection rect + 2 pixels
+ border + some buffer here */
+
+ reg.extents.x1 = MIN(gs->x1, gs->x2) - 5;
+ reg.extents.y1 = MIN(gs->y1, gs->y2) - 5;
+ reg.extents.x2 = MAX(gs->x1, gs->x2) + 5;
+ reg.extents.y2 = MAX(gs->y1, gs->y2) + 5;
damageScreenRegion(s, &reg);
gs->x2 = xRoot;
gs->y2 = yRoot;
- reg.extents.x1 = MIN(gs->x1, gs->x2) - 1;
- reg.extents.y1 = MIN(gs->y1, gs->y2) - 1;
- reg.extents.x2 = MAX(gs->x1, gs->x2) + 1;
- reg.extents.y2 = MAX(gs->y1, gs->y2) + 1;
+ reg.extents.x1 = MIN(gs->x1, gs->x2) - 5;
+ reg.extents.y1 = MIN(gs->y1, gs->y2) - 5;
+ reg.extents.x2 = MAX(gs->x1, gs->x2) + 5;
+ reg.extents.y2 = MAX(gs->y1, gs->y2) + 5;
damageScreenRegion(s, &reg);
}