unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: "Håkon Flatval" <hkon20@hotmail.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	 "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: Sv: Sv: Support for background transparency
Date: Thu, 20 Jan 2022 08:52:51 +0800	[thread overview]
Message-ID: <87wniv2pp8.fsf@yahoo.com> (raw)
In-Reply-To: <PRAP251MB0688E7CFC911925C3F1E399CCF599@PRAP251MB0688.EURP251.PROD.OUTLOOK.COM> ("Håkon Flatval"'s message of "Wed, 19 Jan 2022 17:26:26 +0000")

Håkon Flatval <hkon20@hotmail.com> writes:


> I have attached a final patch. The only changes from the last one is a
> small conflict resolution I did while rebasing today.
>
> Is everything ready to have it merged? And also, how does that happen?
> Is the ball in your court, or does it require action on my end?

I see some problems:

> +  /* This prevents GTK from painting the window's background, which
> +     would interfere with transparent background in some environments */
> +  gtk_widget_set_app_paintable (wtop, TRUE);

This must be under the conditional `!HAVE_PGTK'.

> +#if defined (USE_GTK) && defined (USE_CAIRO)

Why only Cairo?  I see no reason this can't work on non-Cairo
configurations, or Cairo configurations built without GTK.

> +  gui_set_alpha_background,

In this case, please add the frame parameter handler to the rest of the
terminal backends, even if it doesn't do anything:

  - pgtkfns.c
  - nsfns.c
  - w32fns.c
  - haikufns.c

> +                         color.green / 65535.0, color.blue / 65535.0, f->alpha_background);
> +
> +  cairo_set_operator (FRAME_CR_CONTEXT (f), CAIRO_OPERATOR_SOURCE);

Cairo on XCB becomes _very_ slow if this is done and the visual has no
alpha channel, so please make this conditional on both alpha being less
than 1.0 and the display's visual actually having an alpha channel.

Also, I see a hunk that only touches indentation and whitespace.  Please
remove the following whitespace-only change:

> +
>        vinfo = XGetVisualInfo (dpy, VisualIDMask | VisualScreenMask,
>  			      &vinfo_template, &n_visuals);
> +
>        if (n_visuals <= 0)
> -	fatal ("Can't get proper X visual info");
> +	  fatal ("Can't get proper X visual info");

Aside from that, LGTM.  Thanks.



  reply	other threads:[~2022-01-20  0:52 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 19:45 Support for background transparency Håkon Flatval
2021-11-04 20:06 ` Eli Zaretskii
2021-11-04 20:17 ` Lars Ingebrigtsen
2021-11-27 23:01   ` Håkon Flatval
2021-11-28  0:35     ` Sv: " arthur miller
2021-11-28 13:32       ` Lars Ingebrigtsen
2021-11-28 16:04         ` Arthur Miller
2021-11-28 20:33           ` Håkon Flatval
2021-11-29  2:56             ` Arthur Miller
2021-11-28  7:41     ` Eli Zaretskii
2021-11-28  7:47       ` Po Lu
2021-11-28  8:27         ` Eli Zaretskii
2021-12-01 18:54       ` Sv: " Håkon Flatval
2021-12-09 17:13         ` Håkon Flatval
2021-12-10  0:40           ` Lars Ingebrigtsen
2022-01-19 17:26             ` Sv: " Håkon Flatval
2022-01-20  0:52               ` Po Lu [this message]
2022-01-20 19:52                 ` Sv: " Håkon Flatval
2022-01-21  0:59                   ` Po Lu
2022-01-23 13:48                     ` Håkon Flatval
2022-01-24  0:11                       ` Po Lu
2022-01-25 17:53                         ` Håkon Flatval
2022-01-26  1:00                           ` Po Lu
2022-01-24 10:22                       ` Po Lu
2022-01-25 19:47                         ` Håkon Flatval
2022-01-25 19:37                           ` Robert Pluim
2022-01-26 18:16                             ` Håkon Flatval
2022-01-26  1:05                           ` Po Lu
2022-01-26 11:11                             ` Robert Pluim
2022-01-26 18:34                             ` Håkon Flatval
2022-01-27  1:00                               ` Po Lu
2022-01-29  0:01                                 ` Håkon Flatval
2022-01-29  1:08                                   ` Po Lu
2022-01-20  9:12               ` Robert Pluim
2022-01-23 21:43                 ` Håkon Flatval
2022-01-24  9:14                   ` Robert Pluim
2022-01-25 20:00                     ` Håkon Flatval
2022-01-25 19:31                       ` Robert Pluim
2022-01-29 10:26                         ` Po Lu
2022-01-29 15:17                           ` Håkon Flatval
2022-01-30  0:53                             ` Po Lu
2021-11-28 13:41     ` Lars Ingebrigtsen
2021-11-28 15:05       ` Sv: " Håkon Flatval
2021-11-28 16:07         ` Gregor Zattler
2021-11-28 16:32         ` Lars Ingebrigtsen
2021-11-28 18:10     ` Jean Louis
2021-11-28 18:44       ` Sv: " Håkon Flatval

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=87wniv2pp8.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=emacs-devel@gnu.org \
    --cc=hkon20@hotmail.com \
    --cc=larsi@gnus.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).