summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/splash.c
diff options
context:
space:
mode:
authoronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-10-02 19:43:31 +0000
committeronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-10-02 19:43:31 +0000
commitdd15022be0c05897589e886332772c1c200536a7 (patch)
tree1617108bae36af82b8b49e484d1068f59da43088 /beryl-plugins/src/splash.c
parent0fe6deb5dd9ba1279f1398facd8cfa9ba477e1cb (diff)
downloadmarex-dev-dd15022be0c05897589e886332772c1c200536a7.tar.gz
marex-dev-dd15022be0c05897589e886332772c1c200536a7.tar.bz2
added Xinerama support.
git-svn-id: file:///beryl/trunk@443 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/splash.c')
-rw-r--r--beryl-plugins/src/splash.c52
1 files changed, 45 insertions, 7 deletions
diff --git a/beryl-plugins/src/splash.c b/beryl-plugins/src/splash.c
index a7ce507..e114fd1 100644
--- a/beryl-plugins/src/splash.c
+++ b/beryl-plugins/src/splash.c
@@ -448,7 +448,7 @@ splashPaintScreen (CompScreen * s, const ScreenPaintAttrib * sa,
if (ss->hasBack)
{
- int x, y;
+ int x, y, head;
for (x = 0; x < MESH_W; x++)
{
for (y = 0; y < MESH_H; y++)
@@ -463,9 +463,21 @@ splashPaintScreen (CompScreen * s, const ScreenPaintAttrib * sa,
}
enableTexture (s, &ss->back_img, COMP_TEXTURE_FILTER_GOOD);
- x = (s->width - ss->backSize[0]) / 2;
- y = (s->height - ss->backSize[1]) / 2;
+ if (s->useXinerama)
+ {
+ head = screenGetCurrentHead (s);
+ x = (screenGetHeadAreaWidth (s, head) - ss->backSize[0]) / 2;
+ y = (screenGetHeadAreaHeight (s, head) - ss->backSize[1]) / 2;
+
+ x += screenGetHeadAreaX (s, head);
+ y += screenGetHeadAreaY (s, head);
+ }
+ else
+ {
+ x = (s->width - ss->backSize[0]) / 2;
+ y = (s->height - ss->backSize[1]) / 2;
+ }
CompMatrix mat = ss->back_img.matrix;
glTranslatef (x, y, 0);
@@ -500,8 +512,20 @@ splashPaintScreen (CompScreen * s, const ScreenPaintAttrib * sa,
}
glEnd ();
- x = (s->width - ss->backSize[0]) / 2;
- y = (s->height - ss->backSize[1]) / 2;
+ if (s->useXinerama)
+ {
+ head = screenGetCurrentHead (s);
+ x = (screenGetHeadAreaWidth (s, head) - ss->backSize[0]) / 2;
+ y = (screenGetHeadAreaHeight (s, head) - ss->backSize[1]) / 2;
+
+ x += screenGetHeadAreaX (s, head);
+ y += screenGetHeadAreaY (s, head);
+ }
+ else
+ {
+ x = (s->width - ss->backSize[0]) / 2;
+ y = (s->height - ss->backSize[1]) / 2;
+ }
glTranslatef (-x, -y, 0);
disableTexture (s, &ss->back_img);
@@ -510,8 +534,22 @@ splashPaintScreen (CompScreen * s, const ScreenPaintAttrib * sa,
if (ss->hasLogo)
{
enableTexture (s, &ss->logo_img, COMP_TEXTURE_FILTER_GOOD);
- int x = (s->width - ss->logoSize[0]) / 2;
- int y = (s->height - ss->logoSize[1]) / 2;
+ int x, y, head;
+
+ if (s->useXinerama)
+ {
+ head = screenGetCurrentHead (s);
+ x = (screenGetHeadAreaWidth (s, head) - ss->logoSize[0]) / 2;
+ y = (screenGetHeadAreaHeight (s, head) - ss->logoSize[1]) / 2;
+
+ x += screenGetHeadAreaX (s, head);
+ y += screenGetHeadAreaY (s, head);
+ }
+ else
+ {
+ x = (s->width - ss->logoSize[0]) / 2;
+ y = (s->height - ss->logoSize[1]) / 2;
+ }
CompMatrix mat = ss->logo_img.matrix;