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

To reply to this bug, email your comments to 73401 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#73401; Package emacs. (Sat, 21 Sep 2024 04:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Garklein <garklein97 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 21 Sep 2024 04:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Garklein <garklein97 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Make window dividers and internal border respect alpha
 background
Date: Fri, 20 Sep 2024 14:25:14 -0400
[Message part 1 (text/plain, inline)]
Hello,

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.
[dividers-border-transparent.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73401; Package emacs. (Sat, 28 Sep 2024 10:22:02 GMT) Full text and rfc822 format available.

Message #8 received at 73401 <at> debbugs.gnu.org (full text, mbox):

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: Re: 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73401; Package emacs. (Sat, 28 Sep 2024 10:42:01 GMT) Full text and rfc822 format available.

Message #11 received at 73401 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73401 <at> debbugs.gnu.org, Garklein <garklein97 <at> gmail.com>
Subject: Re: bug#73401: [PATCH] Make window dividers and internal border
 respect alpha background
Date: Sat, 28 Sep 2024 18:40:39 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> 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?

We agreed in a previous bug report that this is not an oversight, since
they are borders, not backgrounds.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73401; Package emacs. (Sun, 29 Sep 2024 19:40:02 GMT) Full text and rfc822 format available.

Message #14 received at 73401 <at> debbugs.gnu.org (full text, mbox):

From: Garklein <garklein97 <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 73401 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#73401: [PATCH] Make window dividers and internal border
 respect alpha background
Date: Sun, 29 Sep 2024 15:37:58 -0400
Would it be possible to have an option to make them transparent? It
makes it look a lot better for EXWM.

On Sat, Sep 28, 2024 at 6:40 AM Po Lu <luangruo <at> yahoo.com> wrote:
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> 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?
>
> We agreed in a previous bug report that this is not an oversight, since
> they are borders, not backgrounds.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73401; Package emacs. (Sat, 12 Oct 2024 11:24:01 GMT) Full text and rfc822 format available.

Message #17 received at 73401 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: luangruo <at> yahoo.com, Garklein <garklein97 <at> gmail.com>
Cc: 73401 <at> debbugs.gnu.org
Subject: Re: bug#73401: [PATCH] Make window dividers and internal border
 respect alpha background
Date: Sat, 12 Oct 2024 14:23:32 +0300
Ping!  Po Lu, can you answer the OP?

> From: Garklein <garklein97 <at> gmail.com>
> Date: Sun, 29 Sep 2024 15:37:58 -0400
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 73401 <at> debbugs.gnu.org
> 
> Would it be possible to have an option to make them transparent? It
> makes it look a lot better for EXWM.
> 
> On Sat, Sep 28, 2024 at 6:40 AM Po Lu <luangruo <at> yahoo.com> wrote:
> >
> > Eli Zaretskii <eliz <at> gnu.org> writes:
> >
> > >> 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?
> >
> > We agreed in a previous bug report that this is not an oversight, since
> > they are borders, not backgrounds.
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73401; Package emacs. (Sun, 13 Oct 2024 01:00:02 GMT) Full text and rfc822 format available.

Message #20 received at 73401 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73401 <at> debbugs.gnu.org, Garklein <garklein97 <at> gmail.com>
Subject: Re: bug#73401: [PATCH] Make window dividers and internal border
 respect alpha background
Date: Sun, 13 Oct 2024 08:38:38 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> Ping!  Po Lu, can you answer the OP?
>
>> From: Garklein <garklein97 <at> gmail.com>
>> Date: Sun, 29 Sep 2024 15:37:58 -0400
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, 73401 <at> debbugs.gnu.org
>> 
>> Would it be possible to have an option to make them transparent? It
>> makes it look a lot better for EXWM.

Yes, but I won't be implementing it myself till Emacs 30 is released.
In the interim, patches welcome.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73401; Package emacs. (Sat, 23 Nov 2024 21:58:02 GMT) Full text and rfc822 format available.

Message #23 received at 73401 <at> debbugs.gnu.org (full text, mbox):

From: Garklein <garklein97 <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 73401 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#73401: [PATCH] Make window dividers and internal border
 respect alpha background
Date: Sat, 23 Nov 2024 16:56:26 -0500
[Message part 1 (text/plain, inline)]
Here is a patch that adds this option as a frame parameter.

I hope I did everything correctly, but I have never worked with the
Emacs C source before, so I probably made some mistakes in style or
logic.

Also, should this be factored out so that `border-alpha-background' is
its own parameter? In that case, a lot of functions would need to be
changed (the `respect-alpha-background' parameter in many xterm.c
functions would probably be changed to just a `double alpha` or
something like that). I am up for that, but I'm not sure if it would
be a helpful change.

Please let me know how it looks!


On Sat, Oct 12, 2024 at 8:38 PM Po Lu <luangruo <at> yahoo.com> wrote:
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > Ping!  Po Lu, can you answer the OP?
> >
> >> From: Garklein <garklein97 <at> gmail.com>
> >> Date: Sun, 29 Sep 2024 15:37:58 -0400
> >> Cc: Eli Zaretskii <eliz <at> gnu.org>, 73401 <at> debbugs.gnu.org
> >>
> >> Would it be possible to have an option to make them transparent? It
> >> makes it look a lot better for EXWM.
>
> Yes, but I won't be implementing it myself till Emacs 30 is released.
> In the interim, patches welcome.
[borders-respect-alpha-background.patch (application/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73401; Package emacs. (Sat, 30 Nov 2024 10:26:01 GMT) Full text and rfc822 format available.

Message #26 received at 73401 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: luangruo <at> yahoo.com, Garklein <garklein97 <at> gmail.com>
Cc: 73401 <at> debbugs.gnu.org
Subject: Re: bug#73401: [PATCH] Make window dividers and internal border
 respect alpha background
Date: Sat, 30 Nov 2024 12:24:45 +0200
> From: Garklein <garklein97 <at> gmail.com>
> Date: Sat, 23 Nov 2024 16:56:26 -0500
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 73401 <at> debbugs.gnu.org
> 
> Here is a patch that adds this option as a frame parameter.
> 
> I hope I did everything correctly, but I have never worked with the
> Emacs C source before, so I probably made some mistakes in style or
> logic.
> 
> Also, should this be factored out so that `border-alpha-background' is
> its own parameter? In that case, a lot of functions would need to be
> changed (the `respect-alpha-background' parameter in many xterm.c
> functions would probably be changed to just a `double alpha` or
> something like that). I am up for that, but I'm not sure if it would
> be a helpful change.
> 
> Please let me know how it looks!

Po Lu, any comments?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73401; Package emacs. (Wed, 11 Dec 2024 20:53:01 GMT) Full text and rfc822 format available.

Message #29 received at 73401 <at> debbugs.gnu.org (full text, mbox):

From: Garklein <garklein97 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, 73401 <at> debbugs.gnu.org
Subject: Re: bug#73401: [PATCH] Make window dividers and internal border
 respect alpha background
Date: Wed, 11 Dec 2024 15:51:16 -0500
Any updates on this patch?

On Sat, Nov 30, 2024 at 5:24 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Garklein <garklein97 <at> gmail.com>
> > Date: Sat, 23 Nov 2024 16:56:26 -0500
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, 73401 <at> debbugs.gnu.org
> >
> > Here is a patch that adds this option as a frame parameter.
> >
> > I hope I did everything correctly, but I have never worked with the
> > Emacs C source before, so I probably made some mistakes in style or
> > logic.
> >
> > Also, should this be factored out so that `border-alpha-background' is
> > its own parameter? In that case, a lot of functions would need to be
> > changed (the `respect-alpha-background' parameter in many xterm.c
> > functions would probably be changed to just a `double alpha` or
> > something like that). I am up for that, but I'm not sure if it would
> > be a helpful change.
> >
> > Please let me know how it looks!
>
> Po Lu, any comments?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73401; Package emacs. (Sat, 28 Dec 2024 10:58:02 GMT) Full text and rfc822 format available.

Message #32 received at 73401 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: luangruo <at> yahoo.com, Garklein <garklein97 <at> gmail.com>
Cc: 73401 <at> debbugs.gnu.org
Subject: Re: bug#73401: [PATCH] Make window dividers and internal border
 respect alpha background
Date: Sat, 28 Dec 2024 12:56:38 +0200
Ping! Po Lu, any comments?

> From: Garklein <garklein97 <at> gmail.com>
> Date: Wed, 11 Dec 2024 15:51:16 -0500
> Cc: luangruo <at> yahoo.com, 73401 <at> debbugs.gnu.org
> 
> Any updates on this patch?
> 
> On Sat, Nov 30, 2024 at 5:24 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > > From: Garklein <garklein97 <at> gmail.com>
> > > Date: Sat, 23 Nov 2024 16:56:26 -0500
> > > Cc: Eli Zaretskii <eliz <at> gnu.org>, 73401 <at> debbugs.gnu.org
> > >
> > > Here is a patch that adds this option as a frame parameter.
> > >
> > > I hope I did everything correctly, but I have never worked with the
> > > Emacs C source before, so I probably made some mistakes in style or
> > > logic.
> > >
> > > Also, should this be factored out so that `border-alpha-background' is
> > > its own parameter? In that case, a lot of functions would need to be
> > > changed (the `respect-alpha-background' parameter in many xterm.c
> > > functions would probably be changed to just a `double alpha` or
> > > something like that). I am up for that, but I'm not sure if it would
> > > be a helpful change.
> > >
> > > Please let me know how it looks!
> >
> > Po Lu, any comments?
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73401; Package emacs. (Sat, 08 Feb 2025 12:24:02 GMT) Full text and rfc822 format available.

Message #35 received at 73401 <at> debbugs.gnu.org (full text, mbox):

From: Garklein <garklein97 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, 73401 <at> debbugs.gnu.org
Subject: Re: bug#73401: [PATCH] Make window dividers and internal border
 respect alpha background
Date: Sat, 8 Feb 2025 07:22:47 -0500
Monthly email to see if there's any updates  : )

Sorry about all the bumping, but this patch has made my Emacs a lot
better and I think it may be useful to others too.

On Sat, Dec 28, 2024 at 5:57 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> Ping! Po Lu, any comments?
>
> > From: Garklein <garklein97 <at> gmail.com>
> > Date: Wed, 11 Dec 2024 15:51:16 -0500
> > Cc: luangruo <at> yahoo.com, 73401 <at> debbugs.gnu.org
> >
> > Any updates on this patch?
> >
> > On Sat, Nov 30, 2024 at 5:24 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > >
> > > > From: Garklein <garklein97 <at> gmail.com>
> > > > Date: Sat, 23 Nov 2024 16:56:26 -0500
> > > > Cc: Eli Zaretskii <eliz <at> gnu.org>, 73401 <at> debbugs.gnu.org
> > > >
> > > > Here is a patch that adds this option as a frame parameter.
> > > >
> > > > I hope I did everything correctly, but I have never worked with the
> > > > Emacs C source before, so I probably made some mistakes in style or
> > > > logic.
> > > >
> > > > Also, should this be factored out so that `border-alpha-background' is
> > > > its own parameter? In that case, a lot of functions would need to be
> > > > changed (the `respect-alpha-background' parameter in many xterm.c
> > > > functions would probably be changed to just a `double alpha` or
> > > > something like that). I am up for that, but I'm not sure if it would
> > > > be a helpful change.
> > > >
> > > > Please let me know how it looks!
> > >
> > > Po Lu, any comments?
> >




Added tag(s) confirmed. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 13 Feb 2025 10:26:02 GMT) Full text and rfc822 format available.

This bug report was last modified 180 days ago.

Previous Next


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