unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70697: 30.0.50; Frame parameter alpha-background is ignored for fringe bitmaps & internal borders
@ 2024-05-01 10:52 Aleksandar Dimitrov
  2024-05-09  7:46 ` Eli Zaretskii
  2024-05-16 14:26 ` Aleksandar Dimitrov
  0 siblings, 2 replies; 13+ messages in thread
From: Aleksandar Dimitrov @ 2024-05-01 10:52 UTC (permalink / raw)
  To: 70697

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





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-07-16  8:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-01 10:52 bug#70697: 30.0.50; Frame parameter alpha-background is ignored for fringe bitmaps & internal borders Aleksandar Dimitrov
2024-05-09  7:46 ` 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

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).