Skip to content

WIP: blur: Always allocate at least one pixel

Simon McVittie requested to merge wip/smcv/issue2538 into master

This works around a crash when we try to blur a background that hasn't yet had any space allocated for it (#2538 (closed)), in particular when locking the screen with mutter 3.36.1 and the Native Window Placement extension.


@verdre, I know you were working on this yourself, and you understand the problem space a lot better than I do - but I wanted to get at least a workaround into place, so I can get the rest of the 3.36.1 improvements into Debian. I'm happy to drop this in favour of an actual solution.

I think this is really a mutter bug (or rather a bug in mutter's fork of clutter), but it seems like something that would make the overall system a bit more robust. It looks like a g_return_if_fail would also work, but for this initial hack I wanted to make it more verbose so that it's clear what has happened.

When reproducing #2538 (closed) with mutter 3.36.1 (in particular without mutter!1172 (merged)), this emits these warnings:

../src/shell-blur-effect.c:365: Correcting width from 0.000000 to 1
../src/shell-blur-effect.c:371: Correcting height from 0.000000 to 1

and avoids the crash.

Edited by Simon McVittie

Merge request reports