[Top][All Lists]

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

Sv: Support for background transparency

From: arthur miller
Subject: Sv: Support for background transparency
Date: Sun, 28 Nov 2021 00:35:41 +0000

If it is of any help, I have just rebuild master with the attached patch. It applied cleanly, but I see some artifacts. If you check the attached screenshot, there are two clocks without calendar, these are produced by Emacs with your patch. There are thin lines on the left and right edges where the default background is visible (green from dark solarized theme I use). There is also a separate frame with an eshell window and top with transparent background where those edges are also visible.

These artifacts were not present in previous version of your patch, one that was on your github since ~19 days ago. I have rebuilt from master yesterday with the previous patch rebased, which also cleanly applied, and I have posted some screenshots to this mail list yesterday where one can see similar clock widget with transparency applied without those edges. I have also attached the code for one of clocks so you can see that I have turned off fringes, borders and anything I could.

For the Clock with a calendar is a conky with conky-vision script.

By the way, why can I not see Håkans mail in Gnus? I just see like xml/http headers and stuff, not the message. I had no problems opening any other email from the list that arrived today. I had to open this one  via web browser.

Thanks for the patch & best regards

Från: Emacs-devel <emacs-devel-bounces+arthur.miller=live.com@gnu.org> för Håkon Flatval <hkon20@hotmail.com>
Skickat: den 28 november 2021 00:01
Till: Lars Ingebrigtsen <larsi@gnus.org>
Kopia: emacs-devel@gnu.org <emacs-devel@gnu.org>
Ämne: Re: Support for background transparency
Hi again - sorry for the long radio silence.

>Posting the resulting patch (or a series of patches, depending on how
>much code it is) is the preferred method to get code reviews.

I've attached a patch that implements basic support for background transparency. I have only considered GDK+Cairo build configurations here, as a start.

I believe the gui_set_alpha_background​ function in frame.c​ should return some error message when the frame does not support 32 bits of depth, but am not sure how to do this best. I considered adding a new error code similar to the one used by wrong_type_argument​ (also called from gui_set_...​), but it seemed to be a bit excessive to create a  specific "frame-does-not-support-adequate-bit-depth"-error type when most other error types are of the more general forms "value-out-of-range" or "wrong-length-argument". Does anyone have suggestions on how to best communicate failure in setting alpha to the user?

Newbie question: I can't guarantee that this patch works perfectly with all build variations using GDK+Cairo, nor in all (desktop) environments where Emacs might be used. How, in general, is Emacs tested before release to ensure (most) such edge cases are caught?

I'm currently working on implementing this feature for other XLib-based build configurations too, offline, planning to submit another patch for those in the not-so-distant future.

Håkon Flatval

Fra: Lars Ingebrigtsen <larsi@gnus.org>
Sendt: torsdag 4. november 2021 21:17
Til: Håkon Flatval <hkon20@hotmail.com>
Kopi: emacs-devel@gnu.org <emacs-devel@gnu.org>
Emne: Re: Support for background transparency
Håkon Flatval <hkon20@hotmail.com> writes:

> I have implemented partial support for background transparency in Emacs.

Great!  It's a feature that has been requested many times.

> As I'm completely new to the community, I'd also like some input as to how
> one proceeds with planning and implementation given there is interest for
> this to be made reality. I would be happy to work on this, but not sure I feel
> comfortable / knowledgable enough to do everything on my own.

Posting the resulting patch (or a series of patches, depending on how
much code it is) is the preferred method to get code reviews.

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

Attachment: alpha-patch-screenshot-nov-28.png
Description: alpha-patch-screenshot-nov-28.png

Attachment: emacs-vision-clock.el
Description: emacs-vision-clock.el

reply via email to

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