summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/place.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-16 07:40:42 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-16 07:40:42 +0000
commit3e630fa7fac1450825d3de74e0904451d6dd2b33 (patch)
treec161fcfa8079b1342dc0535e5d1d7d0e1fa40d18 /beryl-plugins/src/place.c
parent8acbe6b490fdc8b0f534a7db0788ebd0bb3af08e (diff)
downloadmarex-dev-3e630fa7fac1450825d3de74e0904451d6dd2b33.tar.gz
marex-dev-3e630fa7fac1450825d3de74e0904451d6dd2b33.tar.bz2
place plugin: minor cleanup (use function for getting work area of current output dev rather than calculating it itself)
git-svn-id: file:///beryl/trunk@1228 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/place.c')
-rw-r--r--beryl-plugins/src/place.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/beryl-plugins/src/place.c b/beryl-plugins/src/place.c
index 3993b40..bcbc8bd 100644
--- a/beryl-plugins/src/place.c
+++ b/beryl-plugins/src/place.c
@@ -213,32 +213,10 @@ static void
get_workarea_of_current_output_device (CompScreen *s,
XRectangle *area)
{
- int x1, y1, x2, y2;
- int oX1, oY1, oX2, oY2;
-
- x1 = s->workArea.x;
- y1 = s->workArea.y;
- x2 = x1 + s->workArea.width;
- y2 = y1 + s->workArea.height;
-
- oX1 = s->outputDev[s->currentOutputDev].region.extents.x1;
- oY1 = s->outputDev[s->currentOutputDev].region.extents.y1;
- oX2 = s->outputDev[s->currentOutputDev].region.extents.x2;
- oY2 = s->outputDev[s->currentOutputDev].region.extents.y2;
-
- if (x1 < oX1)
- x1 = oX1;
- if (y1 < oY1)
- y1 = oY1;
- if (x2 > oX2)
- x2 = oX2;
- if (y2 > oY2)
- y2 = oY2;
-
- area->x = x1;
- area->y = y1;
- area->width = x2 - x1;
- area->height = y2 - y1;
+ int head;
+
+ head = screenGetCurrentOutputDev (s);
+ screenGetOutputDevWorkArea (s, head, area);
}
static int