tsujan / BreezeEnhanced

A fork of KDE Breeze decoration with additional options
GNU General Public License v3.0
162 stars 13 forks source link

Top left corner minor glitch #37

Closed ghost closed 2 years ago

ghost commented 2 years ago

As you can see on the screenshots there is minor glitch in top left corner. Here is how it looks in default Breeze (right picture) in compare to BreezeEnhanced (left picture). I'm using KDE 5.24.4

1 2

tsujan commented 2 years ago

Is KDE's blur effect active in your system?

ghost commented 2 years ago

Yes, and turning it off fixes the issue. But there is any option to disable blur just for window decoration, not system wide?

tsujan commented 2 years ago

This is the "infamous" blur glitch. It isn't caused by BreezeEnhanced.

But there is any option to disable blur just for window decoration, not system wide?

No, there isn't. BreezeEnhanced can either support it or not support it. The code structure, which is inherited from Breeze, doesn't allow an option for it. Of course, we want to support it.

That being said, I'll see if a simple trick could be found. But no promise, especially because I don't have time to maintain a code very different from that of Breeze.

trmdi commented 2 years ago

Is this the infamous korner bug right? If so you can fix it by setting the blurred region: https://invent.kde.org/plasma/kdecoration/-/commit/fb56349603067463ffef1ea158fd7a6c10d26e0f

ghost commented 2 years ago

I don't think code will be very different from default Breeze. Default Breeze doesn't have this issue, it works fine with blur enabled.

tsujan commented 2 years ago

Is this the infamous korner bug right? If so you can fix it by setting the blurred region

Neither Breeze nor BreezeEnhanced does blurring. It's done at a lower level.

Default Breeze doesn't have this issue

Because it doesn't enable blurring. As I said, the Breeze code allows either ignoring or enabling of blurring, without an option.

tsujan commented 2 years ago

OK, apparently, the API is limited (→ https://api.kde.org/plasma/kdecoration/html/index.html). They suppose that you either need or don't need the blur effect. No option.

If you want to keep the blur effect but don't want it with the decoration, you could set the value of org.kde.kdecoration2 → blur to false in BreezeEnhanced/breeze.json and recompile BreezeEnhanced. That's how Breeze does it.

Of course, I've set it to true intentionally; BreezeEnhanced should support translucency + Blurring.

As for the corner bug, it has been there for a long time. Recently, there has been some activity in the direction of fixing it, but it should be fixed upstream.

trmdi commented 2 years ago

That will be changed in KWin 5.15: https://psifidotos.blogspot.com/2022/03/kornersfix.html

tsujan commented 2 years ago

That will be changed in KWin 5.15: https://psifidotos.blogspot.com/2022/03/kornersfix.html

If KWin 5.25 allows setting of the blurred region, yes, it'll be possible to get rid of blur glitches, like what is done in Kvantum (where I added two parameters for blur radii of menus and tooltips).

tsujan commented 2 years ago

KWin 5.25 has been released. The decoration blur effect is disabled by it. It hasn't come to my distro yet (will come soon) , but I prepared a patch for re-enabling the blur effect without corner glitches, based on KDecoration2::Decoration::setBlurRegion(). Once KWin 5.25 comes here, I'll test and complete the patch.

tsujan commented 2 years ago

Sorry for the long delay. Apparently, Manjaro Testing (my distro) has protected its users from bugs in Plasma 5.25. I still have kwin 5.24.6; don't know if 5.25 will come here or Manjaro Testing will jump to 5.26 when it's released.

This had never happened before. I just searched and found several reports about bad bugs in 5.25.

tsujan commented 2 years ago

Done at last (in https://github.com/tsujan/BreezeEnhanced/commit/e9235c91724913a2cf3153d7e47b963917e51677).

The code I'd prepared before 5.25 worked fine. No corner glitches anymore, thanks to the changes in the new KWin. Please upgrade and test it!

EDIT: This screenshot shows there's no corner glitch with blurring anymore:

corners