Big shadows with compton

I've installed Xenial on my computer and enabled compton, but now and then I get really annoying big shadows.

Does anyone have solution for this?

I use the recommended nvidia drivers.

I’m not running compton, but wonder if this could apply.

trie starting compton with this argument “-G” from command line . (e.g. compton -G & exit)

Thanks @IvCHo the borders are now better, but I started compton from mate-tweak. The solution given by webupd8.org actually worked fine

mkdir -p ~/.config/gtk-3.0
pluma ~/.config/gtk-3.0/gtk.css

then add the following:

.window-frame {
box-shadow: none;
margin: 1px;
}

Result:

The huge shadows are gone :slight_smile:

If you apt-get install metacity MATE Tweak will support it. The Metacity integration with Compton is slightly better than Marco and the shadowing is not as pronounced.

The shadow in your screenshot is excessive, what theme?

1 Like

The theme is Numix Daily,

Other than change logs, is there any comparison of the two (marco & metacity)?

I just fixed this double shadowing in GTK3 applications. It will feature in the next release of MATE Tweak :slight_smile:

As I need more than 20 characters I need to type all of this just to say: Thank you @Wimpy. :wink:

2 Likes

Hi,

Will the fix also solve Compton square shadows with applications that have round interface elements, or do those applications require a shadow exception rule?

If helpful, here's an example screen capture showing MacSlow's Cairo-Clock.

No idea, I’ve never used Cairo. Add the xenial-mate PPA which currently hold some bug fix package updates that are queued for the official archive. It has the new MATE Tweak with fixed Compton profile. Switch sway from Compton, then back to activate the new profile and report back :slight_smile:

Tried the PPA. Then as an extra test, tried Metacity + Compton.

With PPA updates, shadow remains the same while using Marco + Compton

While Metacity + Compton produces the same shape shadow, but with less intensity (below screen capture (circular shadow seen in both this and previous screen capture is an svg with alpha transparency)).

In connection with PPA updates:
Liking the window manager switch confirmation! :slight_smile:
A possible future modification, helping provide great visual feedback, could be for the 15 second timer to count down.

Update:
After further tests comparing other window managers, appears the actual issue is Compton shouldn't be adding a shadow for cairo-clock, other window managers (except for non-compositing, which show a solid black square) don't add a shadow, leaving just the svg with alpha transparency (fake circular shadow).

Try the following.

sudo nano /usr/bin/marco-compton

Find the following line --shadow-exclude "class_g ?= 'Cairo-dock'" \ and after it add:

--shadow-exclude "class_g = 'Cairo-clock'" \

Make absolutely certain there are no spaces are the trailing slash. Switch to Marco and then back to Marco Compton. Are the Cairo Clock shadows gone?

1 Like

Perfect! :slight_smile:

Appreciate the other improvements you've made.

Before:

After:

While you're adding Cairo-clock exclude, please can you also add...

--shadow-exclude "class_g ?= 'Mate-panel'" \ to prevent/fix Compton Panel launcher shadows seen below.
Before:

After:

Won't mention how many attempts it took to capture the above images, yes I know, could have used video capture application, but where's the fun in that?! :smile:

When do those shadows on the panel manifest?

Only during in fraction of a second splash animation seen after clicking a panel launcher icon.

I’m getting the shadows around some widgets like My-Weather-Indicator and Gis Weather, as well as the clicking on some panel icons & pressing the Ctrl key to locate the mouse pointer. Tried the trick above adding the gtk.css file into the gtk-3.0 folder, but it didn’t work for me.

I did discover why my Cairo-Dock doesn’t seem to have this problem though. In my Cairo-Dock entry in Startup Applications, mine is set up to execute this on Start Up: cairo-dock -c -W . The -c flag is to Use Cairo backend instead of Open-GL, and the -W, --metacity-workaround Work around some bugs in Metacity Window-Manager (invisible dialogues or sub-docks) . Don’t know if MATE really needs this one, but I keep adding it by habit.

I thought this might help those using cairo-dock & getting the Dark Shadows. :wink:

If helpful, you should find you no longer need to add this to Startup Applications, Cairo-dock is added to the list found in.

/usr/bin/marco-compton

Inserting the following line directly below Cairo-clock (line 54 if editing with Pluma) will fix Panel launcher shadows while using Compton. Hopefully this will be added in a future Ubuntu MATE update! :slight_smile:

--shadow-exclude "class_g ?= 'Mate-panel'" \
1 Like

Interesting. I always had to set Cairo-Dock to not use the Open-GL backend because Cairo-Dock would act weird with my 10 year old ATI graphic card if I left it in Open-GL mode, no matter what Linux distro & Composting I used.

Maybe I.ll try it without those flags & see what happens. Thanks.

[Edit:] Removed the -c and Cairo-Dock doesn’t have the semi-Transparent borders. And it doesn’t act funny like it did before. :wink:

Hmmm… just noticed in line 42 (in Pluma) it has this line: -c -C -G \ which HAS the flags to A: Avoid drawing shadows on dock/panel windows (-C) and B: Don’t draw shadows on DND windows (-G) but in my case it’s still happening. Again, I’m wondering if this is either an AMD open source driver or my video card, as I just checked on my laptop running intel video drivers & no problems using marco with compton. Weird. Wonder if I changed the -r 10 to -r 0 in line 41 to get the radius to go away? :wink:

[Edit:] Nope, tried changing the 10 to 0. Rebooted, still get the semi-Transparent borders.

Did notice something funny though. For fun I went into MATE Tweak and in the Windows tab I changed to Marco (No compositor). Black boxes popped back up. I entered terminal & typed “compton -C -G” (no quotes of course) and pressed enter. Compositing was back on and there were NO semi-transparent borders, not even on the panel when you clicked something & when I pressed Ctrl to find the mouse pointer. So this is getting weird, why does it work when compton is ran seperatly, but not when I choose the Marco with compton? :confused:

I probably should just do a full install & start from scratch, but being lazy, I just made a startup Applications entry named 0 (so it would be first in the list and entered compton -C -G in the command box. Now when I boot, it’s running fine.