unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Nate Sandy <nsan@posteo.de>
To: Po Lu <luangruo@yahoo.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 69782@debbugs.gnu.org
Subject: bug#69782: [PATCH] Fringe bitmaps should respect alpha-background
Date: Sun, 14 Apr 2024 11:01:47 +0000	[thread overview]
Message-ID: <87o7ac2oo4.fsf@posteo.de> (raw)
In-Reply-To: <87zftw21yf.fsf@yahoo.com>

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

Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@gnu.org> writes:

> Nate Sandy <nsan@posteo.de> writes:
>
>> Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
>> editors" <bug-gnu-emacs@gnu.org> writes:
>>
>>> I presume this is a no-toolkit build, correct?
>> I configured Emacs like this:
>>
>>   ./configure --prefix=/home/n/emacs-nix/build-x -C
>>   --with-native-compilation=no 'CFLAGS=-O0 -g3'
>>   --enable-checking=yes,glyphs --enable-check-lisp-object-type
>>   
>> which seems to mean "X toolkit". The error also happens with 29.2, where
>> I see "X toolkit" as well.
>
> You must add:
>
>   --with-x-toolkit=no
I see. Configuring with this flag makes alpha-background work, with
Cairo and Xrender. So alpha-background is only supported without an X
toolkit. Is this intended? From what I can tell, packages usually build
*with* an X toolkit, so most X users cannot use alpha-background?

As it turns out, fringe bitmaps already respect alpha-background when
configuring without Cairo, i.e., with Xrender. As such, I am attaching
the same patch as before, but this time with a commit message that
hopefully conforms to the ChangeLog convention.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Make-fringe-bitmaps-respect-alpha-background.patch --]
[-- Type: text/x-patch, Size: 1523 bytes --]

From b6f31be801f7195ba3fa0c0c8ebed6e10e81c4bb Mon Sep 17 00:00:00 2001
From: Nate Sandy <nsan@posteo.de>
Date: Sun, 14 Apr 2024 12:46:00 +0200
Subject: [PATCH] Make fringe bitmaps respect alpha-background

Fringe bitmaps should respect alpha-background, since the fringe does
as well (Bug#69782).
* src/pgtkterm.c (pgtk_cr_draw_image):
* src/xterm.c (x_cr_draw_image):
Change respect_alpha_background to true.
---
 src/pgtkterm.c | 2 +-
 src/xterm.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 1ec6bfcda4..d891c6a23b 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -2193,7 +2193,7 @@ pgtk_cr_draw_image (struct frame *f, Emacs_GC *gc, cairo_pattern_t *image,
     cairo_rectangle (cr, dest_x, dest_y, width, height);
   else
     {
-      pgtk_set_cr_source_with_gc_background (f, gc, false);
+      pgtk_set_cr_source_with_gc_background (f, gc, true);
       cairo_rectangle (cr, dest_x, dest_y, width, height);
       cairo_fill_preserve (cr);
     }
diff --git a/src/xterm.c b/src/xterm.c
index e08ffd15b1..f47cfbcaa8 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6298,7 +6298,7 @@ x_cr_draw_image (struct frame *f, GC gc, cairo_pattern_t *image,
     cairo_rectangle (cr, dest_x, dest_y, width, height);
   else
     {
-      x_set_cr_source_with_gc_background (f, gc, false);
+      x_set_cr_source_with_gc_background (f, gc, true);
       cairo_rectangle (cr, dest_x, dest_y, width, height);
       cairo_fill_preserve (cr);
     }
-- 
2.44.0


      reply	other threads:[~2024-04-14 11:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 19:13 bug#69782: [PATCH] Fringe bitmaps should respect alpha-background Nate Sandy
2024-03-18 14:02 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-19 13:01   ` Nate Sandy
2024-03-19 14:20     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]       ` <87ttl114bb.fsf@posteo.de>
     [not found]         ` <87v85hoyqq.fsf@yahoo.com>
     [not found]           ` <87il1h9ebb.fsf@posteo.de>
     [not found]             ` <87jzlwpfny.fsf@yahoo.com>
     [not found]               ` <87il1gaq5n.fsf@posteo.de>
2024-03-21 13:23                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-21 19:20                   ` Nathanael Sandy
2024-03-22  0:39                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-22  8:07                       ` Nate Sandy
2024-03-30  7:07                         ` Eli Zaretskii
2024-03-30  7:26                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-30  9:52 ` Nate Sandy
2024-04-13  7:56   ` Eli Zaretskii
2024-04-13 12:02     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-13 15:47       ` Nate Sandy
2024-04-14  1:00         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-14 11:01           ` Nate Sandy [this message]

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=87o7ac2oo4.fsf@posteo.de \
    --to=nsan@posteo.de \
    --cc=69782@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    /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).