Skip to content

Allow transparency

Philipp Schaffrath requested to merge phisch/gnome-calculator:argb_visual into master

This change allows GTK3 themes to make the gnome-calculator window transparent. It checks if a RGBA visual is available and if a compositor is running, and only then uses the RGBA visual, and falls back to the default screen visual otherwise.

When updating the application to GTK4, this will not be necessary anymore since they use RGBA visuals by default. (https://developer.gnome.org/gtk4/stable/gtk-migrating-3-to-4.html#id-1.7.4.3.9)

Here is a little demo video of the old, sad and not transparent gnome-calculator on the right, and the new, happy and exciting gnome-calculator with transparency support on the left:1598613585

Make sure my code is fine, since i have literally learned what vala is like 25 minutes ago.

Merge request reports