unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Garklein <garklein97@gmail.com>
To: 73401@debbugs.gnu.org
Subject: bug#73401: [PATCH] Make window dividers and internal border respect alpha background
Date: Fri, 20 Sep 2024 14:25:14 -0400	[thread overview]
Message-ID: <CALp=CknJSQxectevuGTLX9tgxog4x-uBytJ+wbNxPoYjLu3Wrg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

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.

[-- Attachment #2: dividers-border-transparent.patch --]
[-- Type: text/x-patch, Size: 2772 bytes --]

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

             reply	other threads:[~2024-09-20 18:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20 18:25 Garklein [this message]
2024-09-28 10:20 ` bug#73401: [PATCH] Make window dividers and internal border respect alpha background Eli Zaretskii
2024-09-28 10:40   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-29 19:37     ` Garklein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALp=CknJSQxectevuGTLX9tgxog4x-uBytJ+wbNxPoYjLu3Wrg@mail.gmail.com' \
    --to=garklein97@gmail.com \
    --cc=73401@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).