GNU bug report logs -
#65042
30.0.50; alpha-background doesn't effect background of stipple in emacs 30.0.50 pgtk
Previous Next
Reported by: Felix <felix.dick <at> web.de>
Date: Thu, 3 Aug 2023 16:08:02 UTC
Severity: normal
Found in version 30.0.50
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65042 in the body.
You can then email your comments to 65042 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Thu, 03 Aug 2023 16:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Felix <felix.dick <at> web.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 03 Aug 2023 16:08:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The background of stipple stays opaque with alpha-background parameter
set for transparency.
This came up in the use of the new package 'indent-bars'.
The github issue: https://github.com/jdtsmith/indent-bars/issues/8
I tested this with 'emacs -Q' only enabling the needed packages (compat
and indent-bars).
In GNU Emacs 30.0.50 (build 12, x86_64-pc-linux-gnu, GTK+ Version
3.24.38, cairo version 1.17.8) of 2023-08-03 built on
felix-lifebooka531
Repository revision: 588a0363d9a3ce6d678618ad545f7a8f9af27880
Repository branch: makepkg
System Description: Arch Linux
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
--with-modules --without-libotf --without-m17n-flt --without-gconf
--enable-link-time-optimization --with-native-compilation=yes
--with-xinput2 --with-pgtk --without-xaw3d --with-cairo-xcb
--with-sound=no --with-xwidgets --with-tree-sitter --without-gpm
--without-compress-install
'--program-transform-name=s/\([ec]tags\)/\1.emacs/'
'CFLAGS=-march=native -mtune=generic -O3 -pipe -fno-plt -fexceptions
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
-fstack-clash-protection -fcf-protection'
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK
PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
WEBP XIM XWIDGETS GTK3 ZLIB
Important settings:
value of $LANG: de_DE.UTF-8
locale-coding-system: utf-8
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Thu, 03 Aug 2023 17:28:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 65042 <at> debbugs.gnu.org (full text, mbox):
The following code should visualize the problem.
(font-lock-mode -1)
(set-frame-parameter (selected-frame) 'alpha-background 50)
(let* ((w (window-font-width))
(stipple `(,w 1 ,(apply #'unibyte-string
(append (make-list (1- (/ (+ w 7) 8)) ?\0)
'(1))))))
(insert "\n" (propertize (concat (make-string 15 ?\s)
"THIS IS A TEST"
(make-string 15 ?\s))
'face `(:foreground "blue" :stipple ,stipple))))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Fri, 04 Aug 2023 00:38:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 65042 <at> debbugs.gnu.org (full text, mbox):
Felix <felix.dick <at> web.de> writes:
> The background of stipple stays opaque with alpha-background parameter
> set for transparency.
> This came up in the use of the new package 'indent-bars'.
> The github issue: https://github.com/jdtsmith/indent-bars/issues/8
> I tested this with 'emacs -Q' only enabling the needed packages (compat
> and indent-bars).
Thanks. Do stipples start displaying adequately with this change?
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 9c1fc7bef4e..bc5c6209d42 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -1328,14 +1328,16 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y,
int width, int height)
{
cairo_t *cr = pgtk_begin_cr_clip (f);
+ double r, g, b, a;
cairo_rectangle (cr, x, y, width, height);
cairo_clip (cr);
- double r = ((face->background >> 16) & 0xff) / 255.0;
- double g = ((face->background >> 8) & 0xff) / 255.0;
- double b = ((face->background >> 0) & 0xff) / 255.0;
- cairo_set_source_rgb (cr, r, g, b);
+ r = ((face->background >> 16) & 0xff) / 255.0;
+ g = ((face->background >> 8) & 0xff) / 255.0;
+ b = ((face->background >> 0) & 0xff) / 255.0;
+ a = f->alpha_background;
+ cairo_set_source_rgba (cr, r, g, b, a);
cairo_paint (cr);
if (face->stipple != 0)
@@ -1343,10 +1345,10 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y,
cairo_pattern_t *mask
= FRAME_DISPLAY_INFO (f)->bitmaps[face->stipple - 1].pattern;
- double r = ((face->foreground >> 16) & 0xff) / 255.0;
- double g = ((face->foreground >> 8) & 0xff) / 255.0;
- double b = ((face->foreground >> 0) & 0xff) / 255.0;
- cairo_set_source_rgb (cr, r, g, b);
+ r = ((face->foreground >> 16) & 0xff) / 255.0;
+ g = ((face->foreground >> 8) & 0xff) / 255.0;
+ b = ((face->foreground >> 0) & 0xff) / 255.0;
+ cairo_set_source_rgba (cr, r, g, b, a);
cairo_mask (cr, mask);
}
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Fri, 04 Aug 2023 01:39:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 65042 <at> debbugs.gnu.org (full text, mbox):
Po Lu <luangruo <at> yahoo.com> writes:
> Felix <felix.dick <at> web.de> writes:
>
>> The background of stipple stays opaque with alpha-background parameter
>> set for transparency.
>> This came up in the use of the new package 'indent-bars'.
>> The github issue: https://github.com/jdtsmith/indent-bars/issues/8
>> I tested this with 'emacs -Q' only enabling the needed packages (compat
>> and indent-bars).
>
> Thanks. Do stipples start displaying adequately with this change?
>
No it doesn't.
But it gives weird artifacts (doubling the character one
line above or something like that)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Fri, 04 Aug 2023 01:53:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 65042 <at> debbugs.gnu.org (full text, mbox):
Felix <felix.dick <at> web.de> writes:
> Po Lu <luangruo <at> yahoo.com> writes:
>
>> Felix <felix.dick <at> web.de> writes:
>>
>>> The background of stipple stays opaque with alpha-background parameter
>>> set for transparency.
>>> This came up in the use of the new package 'indent-bars'.
>>> The github issue: https://github.com/jdtsmith/indent-bars/issues/8
>>> I tested this with 'emacs -Q' only enabling the needed packages (compat
>>> and indent-bars).
>>
>> Thanks. Do stipples start displaying adequately with this change?
>>
> No it doesn't.
> But it gives weird artifacts (doubling the character one
> line above or something like that)
How about this?
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 9c1fc7bef4e..a7c687d811d 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -1328,14 +1328,17 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y,
int width, int height)
{
cairo_t *cr = pgtk_begin_cr_clip (f);
+ double r, g, b, a;
+ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_rectangle (cr, x, y, width, height);
cairo_clip (cr);
- double r = ((face->background >> 16) & 0xff) / 255.0;
- double g = ((face->background >> 8) & 0xff) / 255.0;
- double b = ((face->background >> 0) & 0xff) / 255.0;
- cairo_set_source_rgb (cr, r, g, b);
+ r = ((face->background >> 16) & 0xff) / 255.0;
+ g = ((face->background >> 8) & 0xff) / 255.0;
+ b = ((face->background >> 0) & 0xff) / 255.0;
+ a = f->alpha_background;
+ cairo_set_source_rgba (cr, r, g, b, a);
cairo_paint (cr);
if (face->stipple != 0)
@@ -1343,10 +1346,10 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y,
cairo_pattern_t *mask
= FRAME_DISPLAY_INFO (f)->bitmaps[face->stipple - 1].pattern;
- double r = ((face->foreground >> 16) & 0xff) / 255.0;
- double g = ((face->foreground >> 8) & 0xff) / 255.0;
- double b = ((face->foreground >> 0) & 0xff) / 255.0;
- cairo_set_source_rgb (cr, r, g, b);
+ r = ((face->foreground >> 16) & 0xff) / 255.0;
+ g = ((face->foreground >> 8) & 0xff) / 255.0;
+ b = ((face->foreground >> 0) & 0xff) / 255.0;
+ cairo_set_source_rgba (cr, r, g, b, a);
cairo_mask (cr, mask);
}
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Fri, 04 Aug 2023 12:47:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 65042 <at> debbugs.gnu.org (full text, mbox):
Po Lu <luangruo <at> yahoo.com> writes:
> Felix <felix.dick <at> web.de> writes:
>
>> Po Lu <luangruo <at> yahoo.com> writes:
>>
>>> Felix <felix.dick <at> web.de> writes:
>>>
>>>> The background of stipple stays opaque with alpha-background parameter
>>>> set for transparency.
>>>> This came up in the use of the new package 'indent-bars'.
>>>> The github issue: https://github.com/jdtsmith/indent-bars/issues/8
>>>> I tested this with 'emacs -Q' only enabling the needed packages (compat
>>>> and indent-bars).
>>>
>>> Thanks. Do stipples start displaying adequately with this change?
>>>
>> No it doesn't.
>> But it gives weird artifacts (doubling the character one
>> line above or something like that)
>
> How about this?
>
> diff --git a/src/pgtkterm.c b/src/pgtkterm.c
> index 9c1fc7bef4e..a7c687d811d 100644
> --- a/src/pgtkterm.c
> +++ b/src/pgtkterm.c
> @@ -1328,14 +1328,17 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y,
> int width, int height)
> {
> cairo_t *cr = pgtk_begin_cr_clip (f);
> + double r, g, b, a;
>
> + cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
> cairo_rectangle (cr, x, y, width, height);
> cairo_clip (cr);
>
> - double r = ((face->background >> 16) & 0xff) / 255.0;
> - double g = ((face->background >> 8) & 0xff) / 255.0;
> - double b = ((face->background >> 0) & 0xff) / 255.0;
> - cairo_set_source_rgb (cr, r, g, b);
> + r = ((face->background >> 16) & 0xff) / 255.0;
> + g = ((face->background >> 8) & 0xff) / 255.0;
> + b = ((face->background >> 0) & 0xff) / 255.0;
> + a = f->alpha_background;
> + cairo_set_source_rgba (cr, r, g, b, a);
> cairo_paint (cr);
>
> if (face->stipple != 0)
> @@ -1343,10 +1346,10 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y,
> cairo_pattern_t *mask
> = FRAME_DISPLAY_INFO (f)->bitmaps[face->stipple - 1].pattern;
>
> - double r = ((face->foreground >> 16) & 0xff) / 255.0;
> - double g = ((face->foreground >> 8) & 0xff) / 255.0;
> - double b = ((face->foreground >> 0) & 0xff) / 255.0;
> - cairo_set_source_rgb (cr, r, g, b);
> + r = ((face->foreground >> 16) & 0xff) / 255.0;
> + g = ((face->foreground >> 8) & 0xff) / 255.0;
> + b = ((face->foreground >> 0) & 0xff) / 255.0;
> + cairo_set_source_rgba (cr, r, g, b, a);
> cairo_mask (cr, mask);
> }
>
This time it works,
Thanks for this, and thanks your work on Emacs in general!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Fri, 04 Aug 2023 13:30:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 65042 <at> debbugs.gnu.org (full text, mbox):
Felix <felix.dick <at> web.de> writes:
> Po Lu <luangruo <at> yahoo.com> writes:
>
>> Felix <felix.dick <at> web.de> writes:
>>
>>> Po Lu <luangruo <at> yahoo.com> writes:
>>>
>>>> Felix <felix.dick <at> web.de> writes:
>>>>
>>>>> The background of stipple stays opaque with alpha-background parameter
>>>>> set for transparency.
>>>>> This came up in the use of the new package 'indent-bars'.
>>>>> The github issue: https://github.com/jdtsmith/indent-bars/issues/8
>>>>> I tested this with 'emacs -Q' only enabling the needed packages (compat
>>>>> and indent-bars).
>>>>
>>>> Thanks. Do stipples start displaying adequately with this change?
>>>>
>>> No it doesn't.
>>> But it gives weird artifacts (doubling the character one
>>> line above or something like that)
>>
>> How about this?
>>
>> diff --git a/src/pgtkterm.c b/src/pgtkterm.c
>> index 9c1fc7bef4e..a7c687d811d 100644
>> --- a/src/pgtkterm.c
>> +++ b/src/pgtkterm.c
>> @@ -1328,14 +1328,17 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y,
>> int width, int height)
>> {
>> cairo_t *cr = pgtk_begin_cr_clip (f);
>> + double r, g, b, a;
>>
>> + cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
>> cairo_rectangle (cr, x, y, width, height);
>> cairo_clip (cr);
>>
>> - double r = ((face->background >> 16) & 0xff) / 255.0;
>> - double g = ((face->background >> 8) & 0xff) / 255.0;
>> - double b = ((face->background >> 0) & 0xff) / 255.0;
>> - cairo_set_source_rgb (cr, r, g, b);
>> + r = ((face->background >> 16) & 0xff) / 255.0;
>> + g = ((face->background >> 8) & 0xff) / 255.0;
>> + b = ((face->background >> 0) & 0xff) / 255.0;
>> + a = f->alpha_background;
>> + cairo_set_source_rgba (cr, r, g, b, a);
>> cairo_paint (cr);
>>
>> if (face->stipple != 0)
>> @@ -1343,10 +1346,10 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y,
>> cairo_pattern_t *mask
>> = FRAME_DISPLAY_INFO (f)->bitmaps[face->stipple - 1].pattern;
>>
>> - double r = ((face->foreground >> 16) & 0xff) / 255.0;
>> - double g = ((face->foreground >> 8) & 0xff) / 255.0;
>> - double b = ((face->foreground >> 0) & 0xff) / 255.0;
>> - cairo_set_source_rgb (cr, r, g, b);
>> + r = ((face->foreground >> 16) & 0xff) / 255.0;
>> + g = ((face->foreground >> 8) & 0xff) / 255.0;
>> + b = ((face->foreground >> 0) & 0xff) / 255.0;
>> + cairo_set_source_rgba (cr, r, g, b, a);
>> cairo_mask (cr, mask);
>> }
>>
>
> This time it works,
> Thanks for this, and thanks your work on Emacs in general!
OK, thanks. Eli, should this reach Emacs 29.2, or is it too involved
for the release branch?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Fri, 04 Aug 2023 14:06:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 65042 <at> debbugs.gnu.org (full text, mbox):
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: 65042 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
> Date: Fri, 04 Aug 2023 21:28:50 +0800
>
> Felix <felix.dick <at> web.de> writes:
>
> > This time it works,
> > Thanks for this, and thanks your work on Emacs in general!
>
> OK, thanks. Eli, should this reach Emacs 29.2, or is it too involved
> for the release branch?
This is okay for the release branch, thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Mon, 07 Aug 2023 18:04:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 65042 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Po Lu <luangruo <at> yahoo.com>
>> Cc: 65042 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
>> Date: Fri, 04 Aug 2023 21:28:50 +0800
>>
>> Felix <felix.dick <at> web.de> writes:
>>
>> > This time it works,
>> > Thanks for this, and thanks your work on Emacs in general!
>>
>> OK, thanks. Eli, should this reach Emacs 29.2, or is it too involved
>> for the release branch?
>
> This is okay for the release branch, thanks.
Friendly reminding ping.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Tue, 08 Aug 2023 01:02:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 65042 <at> debbugs.gnu.org (full text, mbox):
Felix <felix.dick <at> web.de> writes:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> From: Po Lu <luangruo <at> yahoo.com>
>>> Cc: 65042 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
>>> Date: Fri, 04 Aug 2023 21:28:50 +0800
>>>
>>> Felix <felix.dick <at> web.de> writes:
>>>
>>> > This time it works,
>>> > Thanks for this, and thanks your work on Emacs in general!
>>>
>>> OK, thanks. Eli, should this reach Emacs 29.2, or is it too involved
>>> for the release branch?
>>
>> This is okay for the release branch, thanks.
>
> Friendly reminding ping.
I apologize for neglecting this; it will be installed on the Emacs 29
branch shortly, though you may have to wait several days for that change
to reach master.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Sun, 03 Sep 2023 11:07:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 65042 <at> debbugs.gnu.org (full text, mbox):
Po Lu <luangruo <at> yahoo.com> writes:
> Felix <felix.dick <at> web.de> writes:
>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>>>> From: Po Lu <luangruo <at> yahoo.com>
>>>> Cc: 65042 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
>>>> Date: Fri, 04 Aug 2023 21:28:50 +0800
>>>>
>>>> Felix <felix.dick <at> web.de> writes:
>>>>
>>>> > This time it works,
>>>> > Thanks for this, and thanks your work on Emacs in general!
>>>>
>>>> OK, thanks. Eli, should this reach Emacs 29.2, or is it too involved
>>>> for the release branch?
>>>
>>> This is okay for the release branch, thanks.
>>
>> Friendly reminding ping.
>
> I apologize for neglecting this; it will be installed on the Emacs 29
> branch shortly, though you may have to wait several days for that change
> to reach master.
So this has been fixed? Should the bug be closed?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Sun, 03 Sep 2023 12:08:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 65042 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefankangas <at> gmail.com> writes:
> So this has been fixed? Should the bug be closed?
Yes, all that remains is for Felix to reply.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65042
; Package
emacs
.
(Sun, 03 Sep 2023 12:42:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 65042 <at> debbugs.gnu.org (full text, mbox):
Po Lu <luangruo <at> yahoo.com> writes:
> Stefan Kangas <stefankangas <at> gmail.com> writes:
>
>> So this has been fixed? Should the bug be closed?
>
> Yes, all that remains is for Felix to reply.
I didn't know that a reply is needed, sorry.
It's fixed and can be closed, thanks.
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Sun, 03 Sep 2023 12:52:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Felix <felix.dick <at> web.de>
:
bug acknowledged by developer.
(Sun, 03 Sep 2023 12:52:03 GMT)
Full text and
rfc822 format available.
Message #46 received at 65042-done <at> debbugs.gnu.org (full text, mbox):
Felix <felix.dick <at> web.de> writes:
> Po Lu <luangruo <at> yahoo.com> writes:
>
>> Stefan Kangas <stefankangas <at> gmail.com> writes:
>>
>>> So this has been fixed? Should the bug be closed?
>>
>> Yes, all that remains is for Felix to reply.
>
> I didn't know that a reply is needed, sorry.
> It's fixed and can be closed, thanks.
Thanks, closed.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 02 Oct 2023 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 221 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.