summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-02-26 07:17:18 +0100
committerDanny Baumann <dannybaumann@web.de>2008-02-26 07:17:18 +0100
commit78ea056718b63472223cdf6f7dd9af76b3468394 (patch)
treeac40f6be96d57dc2adf76f4a2de329598ad167cf
parent84a105d33574a224b85ef4d99d402dce021028ee (diff)
parent81a0ca4b154625cb65b9d57a5c081806c84fc1fb (diff)
Merge branch 'master' of git+ssh://maniac@git.freedesktop.org/git/xorg/app/compiz
-rw-r--r--kde/window-decorator-kde4/switcher.cpp1
-rw-r--r--plugins/rotate.c4
-rw-r--r--plugins/svg.c28
3 files changed, 16 insertions, 17 deletions
diff --git a/kde/window-decorator-kde4/switcher.cpp b/kde/window-decorator-kde4/switcher.cpp
index 52b9e975..b5a9897b 100644
--- a/kde/window-decorator-kde4/switcher.cpp
+++ b/kde/window-decorator-kde4/switcher.cpp
@@ -224,6 +224,7 @@ KWD::Switcher::redrawPixmap ()
XSetWindowBackgroundPixmap (QX11Info::display (), mId,
mBackgroundPixmap.handle ());
+ XClearWindow (QX11Info::display (), mId);
}
void
diff --git a/plugins/rotate.c b/plugins/rotate.c
index dfee3268..36fb50d4 100644
--- a/plugins/rotate.c
+++ b/plugins/rotate.c
@@ -1606,9 +1606,9 @@ rotateHandleEvent (CompDisplay *d,
XQueryPointer (d->display, s->root,
&win, &win, &x, &y, &i, &i, &ui);
- if (dx > (s->hsize + 1) / 2)
+ if (dx * 2 > s->hsize)
dx -= s->hsize;
- else if (dx < -(s->hsize + 1) / 2)
+ else if (dx * 2 < -s->hsize)
dx += s->hsize;
o[0].type = CompOptionTypeInt;
diff --git a/plugins/svg.c b/plugins/svg.c
index 69714def..bd39174f 100644
--- a/plugins/svg.c
+++ b/plugins/svg.c
@@ -133,7 +133,7 @@ renderSvg (CompScreen *s,
cairo_save (texture->cr);
cairo_set_operator (texture->cr, CAIRO_OPERATOR_SOURCE);
- cairo_set_source_rgb (texture->cr, 1.0, 1.0, 1.0);
+ cairo_set_source_rgba (texture->cr, 1.0, 1.0, 1.0, 0.0);
cairo_paint (texture->cr);
cairo_set_operator (texture->cr, CAIRO_OPERATOR_OVER);
@@ -153,13 +153,14 @@ renderSvg (CompScreen *s,
}
static Bool
-initSvgTexture (CompScreen *s,
+initSvgTexture (CompWindow *w,
SvgSource *source,
SvgTexture *texture,
int width,
int height)
{
cairo_surface_t *surface;
+ CompScreen *s = w->screen;
Visual *visual;
int depth;
@@ -173,7 +174,10 @@ initSvgTexture (CompScreen *s,
if (width && height)
{
- depth = DefaultDepth (s->display->display, s->screenNum);
+ XWindowAttributes attr;
+ XGetWindowAttributes (s->display->display, w->id, &attr);
+
+ depth = attr.depth;
texture->pixmap = XCreatePixmap (s->display->display, s->root,
width, height, depth);
@@ -190,8 +194,7 @@ initSvgTexture (CompScreen *s,
return FALSE;
}
- visual = DefaultVisual (s->display->display, s->screenNum);
-
+ visual = attr.visual;
surface = cairo_xlib_surface_create (s->display->display,
texture->pixmap, visual,
width, height);
@@ -351,7 +354,7 @@ svgDrawWindow (CompWindow *w,
finiSvgTexture (w->screen, &sw->context->texture[1]);
- if (initSvgTexture (w->screen, sw->context->source,
+ if (initSvgTexture (w, sw->context->source,
&sw->context->texture[1],
width, height))
{
@@ -381,9 +384,7 @@ svgDrawWindow (CompWindow *w,
else if (sw->context->texture[1].width)
{
finiSvgTexture (w->screen, &sw->context->texture[1]);
- initSvgTexture (w->screen, sw->source,
- &sw->context->texture[1],
- 0, 0);
+ initSvgTexture (w, sw->source, &sw->context->texture[1], 0, 0);
memset (&sw->context->rect, 0, sizeof (BoxRec));
@@ -421,9 +422,7 @@ updateWindowSvgContext (CompWindow *w,
sw->context->width = 0;
sw->context->height = 0;
- initSvgTexture (w->screen, source,
- &sw->context->texture[1],
- 0, 0);
+ initSvgTexture (w, source, &sw->context->texture[1], 0, 0);
sw->context->source = source;
@@ -445,8 +444,7 @@ updateWindowSvgContext (CompWindow *w,
x2 = MIN (x2, w->width);
y2 = MIN (y2, w->height);
- if (!initSvgTexture (w->screen, source,
- &sw->context->texture[0],
+ if (!initSvgTexture (w, source, &sw->context->texture[0],
w->width, w->height))
{
free (sw->context);
@@ -457,7 +455,7 @@ updateWindowSvgContext (CompWindow *w,
renderSvg (w->screen, source, &sw->context->texture[0],
0.0f, 0.0f, 1.0f, 1.0f, w->width, w->height);
- initSvgTexture (w->screen, source, &sw->context->texture[1], 0, 0);
+ initSvgTexture (w, source, &sw->context->texture[1], 0, 0);
sw->context->box.extents.x1 = x1;
sw->context->box.extents.y1 = y1;