GNU bug report logs - #73401
[PATCH] Make window dividers and internal border respect alpha background

Previous Next

Package: emacs;

Reported by: Garklein <garklein97 <at> gmail.com>

Date: Sat, 21 Sep 2024 04:08:02 UTC

Severity: normal

Tags: confirmed, patch

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Garklein <garklein97 <at> gmail.com>, Po Lu <luangruo <at> yahoo.com>
Cc: 73401 <at> debbugs.gnu.org
Subject: bug#73401: [PATCH] Make window dividers and internal border respect alpha background
Date: Sat, 28 Sep 2024 13:20:21 +0300
> From: Garklein <garklein97 <at> gmail.com>
> Date: Fri, 20 Sep 2024 14:25:14 -0400
> 
> I'm using EXWM with thick window dividers and internal borders. These
> areas currently aren't affected by the alpha-background frame
> parameter, which looks very ugly. I can't think of any reasons why
> anyone would want this, so I think it's just an oversight. This patch
> just makes them respect it.

Thanks.  Po Lu, any comments?

> diff --git a/src/xterm.c b/src/xterm.c
> index 0c20d38..7f665d8 100644
> --- a/src/xterm.c
> +++ b/src/xterm.c
> @@ -7497,13 +7497,13 @@ x_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1)
>      {
>        XSetForeground (display, f->output_data.x->normal_gc, color_first);
>        x_fill_rectangle (f, f->output_data.x->normal_gc,
> -			x0, y0, 1, y1 - y0, false);
> +			x0, y0, 1, y1 - y0, true);
>        XSetForeground (display, f->output_data.x->normal_gc, color);
>        x_fill_rectangle (f, f->output_data.x->normal_gc,
> -			x0 + 1, y0, x1 - x0 - 2, y1 - y0, false);
> +			x0 + 1, y0, x1 - x0 - 2, y1 - y0, true);
>        XSetForeground (display, f->output_data.x->normal_gc, color_last);
>        x_fill_rectangle (f, f->output_data.x->normal_gc,
> -			x1 - 1, y0, 1, y1 - y0, false);
> +			x1 - 1, y0, 1, y1 - y0, true);
>      }
>    else if ((x1 - x0 > y1 - y0) && (y1 - y0 >= 3))
>      /* A horizontal divider, at least three pixels high: Draw first and
> @@ -7511,13 +7511,13 @@ x_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1)
>      {
>        XSetForeground (display, f->output_data.x->normal_gc, color_first);
>        x_fill_rectangle (f, f->output_data.x->normal_gc,
> -			x0, y0, x1 - x0, 1, false);
> +			x0, y0, x1 - x0, 1, true);
>        XSetForeground (display, f->output_data.x->normal_gc, color);
>        x_fill_rectangle (f, f->output_data.x->normal_gc,
> -			x0, y0 + 1, x1 - x0, y1 - y0 - 2, false);
> +			x0, y0 + 1, x1 - x0, y1 - y0 - 2, true);
>        XSetForeground (display, f->output_data.x->normal_gc, color_last);
>        x_fill_rectangle (f, f->output_data.x->normal_gc,
> -			x0, y1 - 1, x1 - x0, 1, false);
> +			x0, y1 - 1, x1 - x0, 1, true);
>      }
>    else
>      {
> @@ -7525,7 +7525,7 @@ x_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1)
>         differently.  */
>        XSetForeground (display, f->output_data.x->normal_gc, color);
>        x_fill_rectangle (f, f->output_data.x->normal_gc,
> -			x0, y0, x1 - x0, y1 - y0, false);
> +			x0, y0, x1 - x0, y1 - y0, true);
>      }
>  }
>  
> @@ -7732,11 +7732,11 @@ x_clear_under_internal_border (struct frame *f)
>  	  GC gc = f->output_data.x->normal_gc;
>  
>  	  XSetForeground (display, gc, color);
> -	  x_fill_rectangle (f, gc, 0, margin, width, border, false);
> -	  x_fill_rectangle (f, gc, 0, 0, border, height, false);
> -	  x_fill_rectangle (f, gc, width - border, 0, border, height, false);
> +	  x_fill_rectangle (f, gc, 0, margin, width, border, true);
> +	  x_fill_rectangle (f, gc, 0, 0, border, height, true);
> +	  x_fill_rectangle (f, gc, width - border, 0, border, height, true);
>  	  x_fill_rectangle (f, gc, 0, height - bottom_margin - border,
> -			    width, border, false);
> +			    width, border, true);
>  	  XSetForeground (display, gc, FRAME_FOREGROUND_PIXEL (f));
>  	}
>        else




This bug report was last modified 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.