[compiz] GWD button drawing prob-- any Cairo pro have insights?

Gerd Kohlberger lowfi at chello.at
Sun Apr 8 19:45:59 PDT 2007


No forget the patch, after using it some time the maximize glitch is still there. It just seems to appear
less often. I saw some people reporting this on the quinn-forums some time ago, but i don't know if they all
had a nvidia setup. Maybe it's really a driver bug.

Gerd Kohlberger wrote:
> This patch should fix it. It seems to work good here.
> The x-shift is not really necessary, but the close button looks a little 
> sharper that way.
> 
> 
> ------------------------------------------------------------------------
> 
> diff --git a/gtk/window-decorator/gtk-window-decorator.c b/gtk/window-decorator/gtk-window-decorator.c
> index 07ca5b8..15b29f8 100644
> --- a/gtk/window-decorator/gtk-window-decorator.c
> +++ b/gtk/window-decorator/gtk-window-decorator.c
> @@ -933,7 +933,7 @@ button_state_paint (cairo_t	  *cr,
>  
>  	cairo_set_line_width (cr, 1.0);
>  	cairo_stroke (cr);
> -	cairo_set_line_width (cr, 2.0);
> +	cairo_set_line_width (cr, 1.5);
>      }
>      else
>      {
> @@ -1183,7 +1183,7 @@ draw_window_decoration (decor_t *d)
>  
>      cairo_stroke (cr);
>  
> -    cairo_set_line_width (cr, 2.0);
> +    cairo_set_line_width (cr, 1.5);
>  
>      button_x = d->width - d->context->right_space - 13;
>  
> @@ -1197,7 +1197,7 @@ draw_window_decoration (decor_t *d)
>  
>  	if (d->active)
>  	{
> -	    cairo_move_to (cr, x, y);
> +	    cairo_move_to (cr, x + 0.5, y);
>  	    draw_close_button (d, cr, 3.0);
>  	    button_state_paint (cr, style, &color,
>  				d->button_states[BUTTON_CLOSE]);
> @@ -1207,7 +1207,7 @@ draw_window_decoration (decor_t *d)
>  	    gdk_cairo_set_source_color_alpha (cr,
>  					      &style->fg[GTK_STATE_NORMAL],
>  					      alpha * 0.75);
> -	    cairo_move_to (cr, x, y);
> +	    cairo_move_to (cr, x + 0.5, y);
>  	    draw_close_button (d, cr, 3.0);
>  	    cairo_fill (cr);
>  	}
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> compiz mailing list
> compiz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/compiz


More information about the compiz mailing list