GNU bug report logs - #70697
30.0.50; Frame parameter alpha-background is ignored for fringe bitmaps & internal borders

Previous Next

Package: emacs;

Reported by: Aleksandar Dimitrov <mail <at> aleks.bg>

Date: Wed, 1 May 2024 12:02: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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#70697: closed (30.0.50; Frame parameter alpha-background is
 ignored for fringe bitmaps & internal borders)
Date: Sat, 01 Mar 2025 02:37:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 28 Feb 2025 18:36:25 -0800
with message-id <CADwFkmn03_nq57GhNHM7oyoq5LZ9k49b68uC4igBihPEdoYkSA <at> mail.gmail.com>
and subject line Re: bug#70697: 30.0.50; Frame parameter alpha-background is ignored for fringe bitmaps & internal borders
has caused the debbugs.gnu.org bug report #70697,
regarding 30.0.50; Frame parameter alpha-background is ignored for fringe bitmaps & internal borders
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
70697: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70697
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Aleksandar Dimitrov <mail <at> aleks.bg>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Frame parameter alpha-background is ignored for fringe
 bitmaps & internal borders
Date: Wed, 01 May 2024 12:52:58 +0200
Hi all,

Runinng in any compositing window manager (this includes Wayland with a
PGTK build of Emacs, but also X without PGTK), the frame parameter
alpha-background is ignored for at least

- fringe bitmaps
- insets drawn with internal-border-width

The resulting visual effect is quite jarring, and makes both of these
difficult to use together with transparency.

Here's a small emacs -Q script to exhibit the problem:

#+begin_src emacs-lisp

;; Turn off scroll bars to make the bugs more visible.
(scroll-bar-mode -1)

;; set transparency & internal border width.
;; Note how the internal border is going to be drawn in a solid white colour
;; and will ignore the alpha value.
(modify-all-frames-parameters '((alpha-background . 50)
                                (internal-border-width . 20)))

(define-fringe-bitmap 'test-bitmap
  (vector (expt 2 15)) nil 16 '(top t))

;; Define a face for the fringe that has a different background colour, to
;; more easily discern the fringe bitmap bug from the internal border bug.
(make-face 'test-face)
(set-face-attribute 'test-face nil :background "pink")

;; Apply a fringe bitmap to all lines in the current buffer. Note how the fringe
;; bitmap is monochrome, but the background colour ignores the global alpha value.
(defun apply-fringe-bitmap ()
  "Apply a fringe bitmap to the current buffer to exhibit the transparency bug."
  (add-text-properties
   (point-min) (point-max)
   '(wrap-prefix
     #(" " 0 1 (display (left-fringe test-bitmap test-face)))
     line-prefix
     #(" " 0 1 (display (left-fringe test-bitmap test-face))))))

(add-hook 'emacs-startup-hook #'apply-fringe-bitmap)

#+end_src


And here's how it looks like: https://aleks.bg/emacs-bug.png
(that's my personal home page, not an image hoster.)

I would expect the white border around the frame to also be transparent,
and the fringe, too.


Aleks


[Message part 3 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Aleksandar Dimitrov <mail <at> aleks.bg>,
 70697-done <at> debbugs.gnu.org
Subject: Re: bug#70697: 30.0.50; Frame parameter alpha-background is ignored
 for fringe bitmaps & internal borders
Date: Fri, 28 Feb 2025 18:36:25 -0800
Po Lu <luangruo <at> yahoo.com> writes:

> Aleksandar Dimitrov <mail <at> aleks.bg> writes:
>
>> Hi Eli, Po Lu,
>>
>> sorry for taking a while to get back to you, I've had a busy week or
>> two.
>>
>> I've tried out Po Lu's patch. Now:
>>
>> - the bug with the fringe is fixed in both pgtk and gtk3
>
> Thanks, this portion of the patch has been installed in emacs-30.

I'm therefore closing this bug report.

>> - insets are not opaque anymore in pgtk
>> - insets are *black* and opaque with the minimal repro I posted in the beginning of
>>   this thread --with-pgtk
>> - insets are *white* and opaque --with-x-toolkit=gtk3 (again with the minimal repro)
>>
>> I'm not sure why that is, or whether that's a problem.
>
> I'll continue pursuing this matter.


This bug report was last modified 145 days ago.

Previous Next


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