blur-my-shell icon indicating copy to clipboard operation
blur-my-shell copied to clipboard

Broken application blur on Wayland if fractional scaling is off

Open FelixFourcolor opened this issue 2 years ago • 7 comments

~~v55, when fractional scaling is off, unfocused windows are incorrectly blurred~~

~~The window on the left is focused. On the unfocused windows, the entire thing is blurred instead of only the background.~~ (See EDIT below.)

Screenshot from 2024-02-19 02-11-08

I think commit e2426578f5651dce33616cb3ba22e4339f199cc7 is the culprit, because when I revert it the problem disappears. But the commit fixes #362. So basically the situation is:

With e2426578f5651dce33616cb3ba22e4339f199cc7 Without e2426578f5651dce33616cb3ba22e4339f199cc7
Fractional scaling on working broken (#362)
Fractional scaling off broken (this issue) working

EDIT: I had an incorrect understanding of the issue (thanks to @alesya-h for pointing it out). It's not inherently about blurring of unfocused windows, but about the size and placement of the blur box. This screenshot shows it more clearly. Screenshot from 2024-02-20 17-05-24

If there are multiple windows on-screen, the unfocused ones will be put behind the blur box of the focused window, thus it looks like unfocused windows are incorrectly blurred. Screenshot from 2024-02-20 17-05-58

FelixFourcolor avatar Feb 19 '24 11:02 FelixFourcolor

Thanks for the testing, so I'm not alone with this issue!

I will try to find a variable to know whether or not the user uses fractional scaling, and change the behaviour accordingly. That's a shame though that it is so hard to get right...

aunetx avatar Feb 19 '24 13:02 aunetx

Should we perhaps revert the commit until a solution is found? After all, fractional scaling is an experimental feature, it's better to break it than to break the default.

FelixFourcolor avatar Feb 19 '24 23:02 FelixFourcolor

@aunetx I just checked and if "scale-monitor-framebuffer" experimental feature is turned off the size of blur actors is double the size of what it should be. Presumably that's what it should have branched on. On the screenshot I assume that's also what happened - the blur actor from the left window extended to the right one over the right terminal and the background between terminals on the screenshot is also blurred. So this bug I assume is incorrect, it has nothing to do with blurring unfocused windows, probably just looked that way because of tiling

alesya-h avatar Feb 20 '24 03:02 alesya-h

@alesya-h

So this bug I assume is incorrect, it has nothing to do with blurring unfocused windows, probably just looked that way because of tiling.

I agree. I will edit the title accordingly.

FelixFourcolor avatar Feb 20 '24 04:02 FelixFourcolor

Hello, does #534 works for you? It should check if the experimental feature is enabled before using the scaling divisor!

aunetx avatar Feb 24 '24 14:02 aunetx

Works well for me, both with and without scale-monitor-framebuffers. I didn't test x11 apps though, would be good if someone else checks it

alesya-h avatar Feb 25 '24 02:02 alesya-h

I checked both on x11 session and wayland session; the latter both with native wayland and xwayland apps, with and without scale-monitor-framebuffers. Everything works.

(Other than what I assume is a missing import, as I wrote in the #534 discussion. I had to add a line import Gio from 'gi://Gio' in src/components/applications.js otherwise the extension wouldn't run.)

FelixFourcolor avatar Feb 25 '24 02:02 FelixFourcolor