Hello,
it appears xcompmgr does not decorate windows with ARGB 32-bit
visuals; which at first sight seems probably a preference of
artistic taste than a result of engineering considerations. :-)
By the attached tweak may I suggest to turn this fixed setting into
an optional choice by command line boolean parameter '-A'. I.e. in
this case the computed shadow picture is cleaned in the middle
partially, in particular pixel-exactly covering the area of the
spoken window including its border, by XRenderFillRectangle() in
win_extents() in xcompmgr.c.
The attached patch should apply cleanly ontop of the 'Proposal:...'
as posted on
http://lists.freedesktop.org/archives/xorg/2009-September/047302.html
otherwise the hunk
@@ -1944,7 +1954,7 @@
int o;
char *rootfill = NULL;
- while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:b:scnfFCaS"))
!= -1)
+ while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:b:scnfFCaSA"))
!= -1)
{
switch (o) {
case 'd':
needs a minor edit.
Greetings,
Eeri Kask
--- xcompmgr.c.orig 2009-09-23 14:51:38.000000000 +0200
+++ xcompmgr.c 2009-09-23 14:54:08.000000000 +0200
@@ -190,6 +190,7 @@
static Bool fadeWindows = False;
static Bool excludeDockShadows = False;
static Bool fadeTrans = False;
+static Bool includeARGBshadows = False;
static Bool autoRedirect = False;
@@ -829,7 +830,7 @@
r.height = w->a.height + w->a.border_width * 2;
if (compMode != CompSimple && !(w->windowType == winDockAtom &&
excludeDockShadows))
{
- if (compMode == CompServerShadows || w->mode != WINDOW_ARGB)
+ if (compMode == CompServerShadows || (includeARGBshadows == True ||
w->mode != WINDOW_ARGB))
{
XRectangle sr;
@@ -853,6 +854,14 @@
w->a.width + w->a.border_width
* 2,
w->a.height + w->a.border_width
* 2,
&w->shadow_width,
&w->shadow_height);
+ if (w->shadow != None && w->mode == WINDOW_ARGB)
+ {
+ XRenderColor c = {0}; /* set window/border area to
transparent */
+ XRenderFillRectangle (dpy, PictOpSrc, w->shadow, &c,
+ -w->shadow_dx, -w->shadow_dy,
+ w->a.width + w->a.border_width
* 2,
+ w->a.height + w->a.border_width
* 2);
+ }
}
}
sr.x = w->a.x + w->shadow_dx;
@@ -1866,6 +1875,7 @@
fprintf (stderr, " -a\n Use automatic server-side compositing.
Faster, but no special effects.\n");
fprintf (stderr, " -c\n Draw client-side shadows with fuzzy
edges.\n");
fprintf (stderr, " -C\n Avoid drawing shadows on dock/panel
windows.\n");
+ fprintf (stderr, " -A\n Draw rectangular shadows even on
ARGB-visual windows.\n");
fprintf (stderr, " -f\n Fade windows in/out when
opening/closing.\n");
fprintf (stderr, " -F\n Fade windows during opacity changes.\n");
fprintf (stderr, " -n\n Normal client-side compositing with
transparency support\n");
@@ -1944,7 +1954,7 @@
int o;
char *rootfill = NULL;
- while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:b:scnfFCaS")) != -1)
+ while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:b:scnfFCaSA")) != -1)
{
switch (o) {
case 'd':
@@ -1974,6 +1984,9 @@
case 'C':
excludeDockShadows = True;
break;
+ case 'A':
+ includeARGBshadows = True;
+ break;
case 'n':
compMode = CompSimple;
break;
_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg