How do I control all window shadows?

Solution 1:

The solution to this is to edit the "gtk.css" in whatever theme you are using - themes do control the drop/box shadow. I've tested this on Ubuntu 18.04. You can edit the default at "~/.config/gtk-3.0/gtk.css" or, a much better idea, you can edit your own installed theme, even if that's a copy of the default theme. Install your theme in your home directory "~/.themes/" folder and then find the "gtk.css" file in it's "gtk-3.0" folder. Open the file in a text editor and search for "decoration" and "decoration:backdrop". To remove the windows shadow comment out the box-shadow line and add your own set to "none" like so:

decoration
{
    border-radius: 6px 6px 0 0;
    border-width: 0px;
    /*box-shadow: 1px 12px 12px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.18);*/
    box-shadow: none;
    margin: 4px;
}

decoration:backdrop
{
    border-radius: 6px 6px 0 0;
    border-width: 0px;
    /*box-shadow: 1px 12px 12px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.18);*/
    box-shadow: none;
    margin: 4px;
}

Save the file. In Settings > Appearance you'll need to load the theme - if you were already using it change the them to another theme and then change it back to your theme again. Windows should now have no shadows - see image below.

enter image description here