emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sv: Sv: Support for background transparency


From: Po Lu
Subject: Re: Sv: Sv: Support for background transparency
Date: Thu, 20 Jan 2022 08:52:51 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]