[Xfce4-commits] [xfce/xfwm4] 04/04: Avoid window decorations in preview
noreply at xfce.org
noreply at xfce.org
Sat Feb 21 15:19:14 CET 2015
This is an automated email from the git hooks/post-receive script.
olivier pushed a commit to branch master
in repository xfce/xfwm4.
commit 41ebdc76247fb2ea8bd55332a8502b5a4c92aeda
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Sat Feb 21 15:18:00 2015 +0100
Avoid window decorations in preview
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
src/compositor.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index e4fd3c8..6c6d3af 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2891,7 +2891,9 @@ compositorScaleWindowPixmap (CWindow *cw, guint *width, guint *height)
XTransform transform;
XRenderPictFormat *render_format;
double scale;
- int tx, ty, src_size, dest_size;
+ int tx, ty;
+ int src_x, src_y;
+ int src_size, dest_size;
unsigned int src_w, src_h;
unsigned int dst_w, dst_h;
XRenderColor c = { 0x7fff, 0x7fff, 0x7fff, 0xffff };
@@ -2912,6 +2914,18 @@ compositorScaleWindowPixmap (CWindow *cw, guint *width, guint *height)
/* Get the source pixmap size to compute the scale */
get_paint_bounds (cw, &tx, &ty, &src_w, &src_h);
+ if (WIN_HAS_CLIENT(cw))
+ {
+ src_x = ABS(frameExtentLeft (cw->c));
+ src_y = ABS(frameExtentTop (cw->c));
+ src_w = src_w - src_x - ABS(frameExtentRight (cw->c));
+ src_h = src_h - src_y - ABS(frameExtentBottom (cw->c));
+ }
+ else
+ {
+ src_x = 0;
+ src_y = 0;
+ }
src_size = MAX (src_w, src_h);
/*/
@@ -2963,7 +2977,7 @@ compositorScaleWindowPixmap (CWindow *cw, guint *width, guint *height)
XRenderFillRectangle (dpy, PictOpSrc, tmpPicture, &c, 0, 0, src_w, src_h);
XFixesSetPictureClipRegion (dpy, tmpPicture, 0, 0, None);
XRenderComposite (dpy, PictOpOver, srcPicture, None, tmpPicture,
- 0, 0, 0, 0, 0, 0, src_w, src_h);
+ src_x, src_y, 0, 0, 0, 0, src_w, src_h);
XRenderSetPictureFilter (dpy, tmpPicture, FilterBest, NULL, 0);
XRenderSetPictureTransform (dpy, tmpPicture, &transform);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list