shadow_opacity.patch

Damien "tuX" Thebault damien.thebault at laposte.net
Tue Aug 31 03:33:26 PDT 2004


Giovanni wrote:
> it rejects it:
> 
> 
> patching file xcompmgr.c
> Hunk #2 FAILED at 715.
> Hunk #3 succeeded at 1854 with fuzz 2.
> 1 out of 3 hunks FAILED -- saving rejects to file xcompmgr.c.rej
> patch unexpectedly ends in middle of line
> 
> 
> xcompmgr.c.rej
> 
>   GNU nano 1.3.2                                                      File: 
> xcompmgr.c.rej
> 
> 
> ***************
> *** 715,721 ****
>     {
>         double opacity = SHADOW_OPACITY;
>         if (w->mode == WINDOW_TRANS)
> -    opacity = opacity * TRANS_OPACITY;
>         w->shadow = shadow_picture (dpy, opacity,
>         w->a.width + w->a.border_width * 2,
>         w->a.height + w->a.border_width * 2,
> --- 715,721 ----
>     {
>         double opacity = SHADOW_OPACITY;
>         if (w->mode == WINDOW_TRANS)
> +    opacity = opacity * ((double)w->opacity)/((double)OPAQUE);
>         w->shadow = shadow_picture (dpy, opacity,
>         w->a.width + w->a.border_width * 2,
>         w->a.height + w->a.border_width * 2,

Well, you'r right, it is about the html encoding of the mail...
I'm really sorry about that :(
I attached the patch with this mail so it must be good (plain text)
This patche applies just to cvs, and I checked it works :

cvs -d :pserver:anoncvs at cvs.freedesktop.org:/cvs/xapps login
cvs -d :pserver:anoncvs at pdx.freedesktop.org:/cvs/xapps co xcompmgr
cd xcompmgr
patch -p0 <shadow_opacity.patch
./autogen.sh
./configure
make

--- so this is the patch

--- xcompmgr.ori.c      2004-08-30 21:40:15.755197856 +0200
+++ xcompmgr.c  2004-08-30 22:03:22.103440888 +0200
@@ -141,7 +141,7 @@
  #define WINDOW_TRANS   1
  #define WINDOW_ARGB    2

-#define TRANS_OPACITY  0.75
+#define OPAQUE 0xffffffff

  #define DEBUG_REPAINT 0
  #define DEBUG_EVENTS 0
@@ -715,7 +715,7 @@
                 {
                     double      opacity = SHADOW_OPACITY;
                     if (w->mode == WINDOW_TRANS)
-                       opacity = opacity * TRANS_OPACITY;
+                       opacity = opacity * 
((double)w->opacity)/((double)OPAQUE);
                     w->shadow = shadow_picture (dpy, opacity,
                                                 w->a.width + 
w->a.border_width * 2,
                                                 w->a.height + 
w->a.border_width * 2,
@@ -1854,6 +1854,8 @@
                     {
                         w->opacity = get_opacity_prop(dpy, w, OPAQUE);
                         determine_mode(dpy, w);
+                       w->shadow = None;
+                       w->extents = win_extents(dpy, w);
                     }
                 }
                 break;



More information about the xorg mailing list