unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Aleksandar Dimitrov <mail@aleks.bg>
To: 70697@debbugs.gnu.org
Subject: bug#70697: 30.0.50; Frame parameter alpha-background is ignored for fringe bitmaps & internal borders
Date: Wed, 01 May 2024 12:52:58 +0200	[thread overview]
Message-ID: <871q6liz1x.fsf@aleks.bg> (raw)

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





             reply	other threads:[~2024-05-01 10:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-01 10:52 Aleksandar Dimitrov [this message]
2024-05-09  7:46 ` bug#70697: 30.0.50; Frame parameter alpha-background is ignored for fringe bitmaps & internal borders Eli Zaretskii
2024-05-09  8:03   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-16 14:26 ` Aleksandar Dimitrov
2024-06-01 14:03   ` Eli Zaretskii
2024-06-01 14:07     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-03 20:24       ` Aleksandar Dimitrov
2024-06-15  8:11         ` Eli Zaretskii
2024-06-15 11:20           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-27  7:41             ` Eli Zaretskii
2024-07-08 17:08               ` Aleksandar Dimitrov
2024-07-09  6:12                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-16  8:11                   ` Aleksandar Dimitrov

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=871q6liz1x.fsf@aleks.bg \
    --to=mail@aleks.bg \
    --cc=70697@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).