a-parhom / LightlyShaders

Rounded window corners and outline effect for KWin.
367 stars 24 forks source link

Glitch when moving windows on bottom window corners #56

Closed ramon501 closed 1 year ago

ramon501 commented 2 years ago

here it was up to date til fix 53, then ran git pull to get all updates and now i have glitches when moving windows, didn't have this issue before

xaqbr commented 2 years ago

same here. im hanging on an older commit til then

a-parhom commented 2 years ago

Could you, please, provide video of the issue? Also, please, tell which Plasma version do you have?

ramon501 commented 2 years ago

https://user-images.githubusercontent.com/106532546/185389058-0398cfa9-296b-4fdb-86c9-f7a1a67d4c6f.mp4

The screentearing is from the video, recording with opengl did not work for me, disabling wobbly windows effect helps a lot but i still have glitch when closing windows plasmashell 5.25.4

zetastormy commented 2 years ago

Same happens to me, but with some little differences:

https://user-images.githubusercontent.com/56933557/187001197-3b45f850-5e6d-4303-8da8-b7dae498f97e.mp4

As you can see in the right side of the Konsole window, the outline appears to be scaling at the same time as the opening and closing animations happen. Also running KDE Plasma 5.25.4

p0ryae commented 2 years ago

I don't use this feature personally, But I can also confirm the same issues happen to me when enabling it.

KDE Plasma 5.25.4 Is what I'm running.

a-parhom commented 2 years ago

These animation effects can not be supported with current version of LightlyShaders, unfortunately. It is limited by the currently used approach of shaping corners and drawing outline.

The good news is that I'm working on another version, LightlyShaders 2.0, so to speak, that will use different approach which will potentially fix this and other issues of working together with other effects, as well as significantly improve performance. In some days I'm planning to push it to a separate branch. It will be still work in progress and may contain bugs for some time, though.

cquasar commented 2 years ago

These animation effects can not be supported with current version of LightlyShaders, unfortunately. It is limited by the currently used approach of shaping corners and drawing outline.

The good news is that I'm working on another version, LightlyShaders 2.0, so to speak, that will use different approach which will potentially fix this and other issues of working together with other effects, as well as significantly improve performance. In some days I'm planning to push it to a separate branch. It will be still work in progress and may contain bugs for some time, though.

I'm looking forward to 2.0!

p0ryae commented 2 years ago

Great! the current version is really great other then a few minor bugs which can be ignored by the user for now.

we appreciate your work and we are all looking forward into 2.0 👀

a-parhom commented 2 years ago

Uploaded: https://github.com/a-parhom/LightlyShaders/tree/v2.0

But it's not complete yet, things may break or just not work.

p0ryae commented 2 years ago

But it's not complete yet, things may break or just not work.

No worries. Going to give it a test myself right now.

p0ryae commented 2 years ago

Okay wow. It's actually much improved compared to v1.0 in terms of quality of the roundness. It's less pixelated. No issues encounter so far with v2.0.

However, There is a feature missing and doesn't seem to work, and that is the outline. It doesn't seem to be appearing for me.

a-parhom commented 2 years ago

It's not implemented yet, I've mentioned that in the readme for branch v2.0.

p0ryae commented 2 years ago

Just noticed. Thanks for clarifying.

It'll be nice to have the ability to force the corner radius on the Window Decoration chosen. On my Sweet-Dark Window Decoration I'm missing the top area's corner radius, which is not in sync with the radius chosen in the LightlyShader 2.0:

image

ramon501 commented 2 years ago

How do i switch to the new branch ?

p0ryae commented 2 years ago

How do i switch to the new branch ?

It's not recommended to switch to at the moment based on the dev, but if you're impatient and can't wait, use git to clone the repo, and then switch to v2.0 branch. (git switch v2.0)

a-parhom commented 2 years ago

It'll be nice to have the ability to force the corner radius on the Window Decoration chosen. On my Sweet-Dark Window Decoration I'm missing the top area's corner radius, which is not in sync with the radius chosen in the LightlyShader 2.0:

In v2.0 we will have to rely on decorations, that correctly deal with korner bug (since Plasma 5.25) and have an option to adjust radius. You can try SierraBreezeEnhanced to achieve similar results as on your screenshot.

ramon501 commented 2 years ago

Just switched to branch v2.0, working great here

a-parhom commented 2 years ago

The reason for this limitation is that the new approach, which gives us full compatibility with other effects and very good performance, doesn't give us access to modifying blur region in the titlebar area. Only window decorations have access to it. And though it looks like it's possible to cut top corners and interpolate shadows underneath, the blur will still be there, and we will have "korner bug 2.0".

p0ryae commented 2 years ago

Fair enough. SierraBreezeEnhanced is much more customizable then other window decorations and I never had any ideas that it existed to begin with.

Thank you once again.

cquasar commented 2 years ago

Uploaded: https://github.com/a-parhom/LightlyShaders/tree/v2.0

But it's not complete yet, things may break or just not work.

Great work. Thanks a lot! I'll be waiting for the outline icing on the cake.

a-parhom commented 2 years ago

Great work. Thanks a lot! I'll be waiting for the outline icing on the cake.

Outline implemented.

p0ryae commented 2 years ago

Outline implemented.

Amazing work! Just tested it and it works neatly. No bugs experienced other then sometimes the border lines might just leave some prints on the screen occasionally, but it's much better handled then v1 for sure.

ramon501 commented 2 years ago

I didn't have luck with the latest commits, looks like kwin_x11 keeps restarting all the time on a non-stopping loop, i had to log on a xfce session to uninstall LightlyShaders

xaqbr commented 2 years ago

Outline implemented.

Thank you so much! It looks great!

a-parhom commented 2 years ago

I didn't have luck with the latest commits, looks like kwin_x11 keeps restarting all the time on a non-stopping loop, i had to log on a xfce session to uninstall LightlyShaders

That is weird. Could you give some details about your configuration?

ramon501 commented 2 years ago

I tried to install it again but i had no compositing on plasma this time even not on restart, i had to re-enable compositing from systemsettings, i'll leave the output of the install here

Install the project... -- Install configuration: "Debug" -- Installing: /usr/lib/qt/plugins/kwin/effects/plugins/kwin4_effect_lightlyshaders.so -- Installing: /usr/share/kwin/shaders/1.40/lightlyshaders.frag -- Installing: /usr/lib/qt/plugins/kwin/effects/configs/kwin4_lightlyshaders_config.so [ramon@ramon-m61pmes2p qt5build]$ kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:11:31: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:16:28: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:17:28: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:19:34: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:20:34: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:22:39: a sequence already exists which is a prefix of this sequence; overriding kwin_xkbcommon: XKB: inet:323:58: unrecognized keysym "XF86EmojiPicker" kwin_xkbcommon: XKB: inet:324:58: unrecognized keysym "XF86Dictate" OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce 210/PCIe/SSE2 OpenGL version string: 3.1.0 NVIDIA 340.108 OpenGL shading language version string: 1.40 NVIDIA via Cg compiler Driver: NVIDIA Driver version: 340.108 GPU class: G80/G90 OpenGL version: 3.1 GLSL version: 1.40 X server version: 1.21.1 Linux kernel version: 5.19.9 Requires strict binding: no GLSL shaders: yes Texture NPOT support: yes Virtual Machine: no QObject::connect(KWin::InputMethod, KWin::EffectsHandlerImpl): invalid nullptr parameter Application::crashHandler() called with signal 11; recent crashes: 1 22 -- exe=/usr/bin/kwin_x11 13 -- platform=xcb 11 -- display=:0 17 -- appname=kwin_x11 17 -- apppath=/usr/bin 10 -- signal=11 10 -- pid=32477 18 -- appversion=5.25.5 17 -- programname=KWin 31 -- bugaddress=submit@bugs.kde.org 12 -- startupid=0 KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = kwin_x11 path = /usr/bin pid = 32477 KCrash: Arguments: /usr/bin/kwin_x11 --replace KCrash: Attempting to start /usr/lib/drkonqi QSocketNotifier: Invalid socket 4 with type Read, disabling... qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 180, resource id: 67108874, major code: 20 (GetProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 181, resource id: 67108874, major code: 20 (GetProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 180, resource id: 67108874, major code: 20 (GetProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 181, resource id: 67108874, major code: 20 (GetProperty), minor code: 0 kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:11:31: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:16:28: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:17:28: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:19:34: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:20:34: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:22:39: a sequence already exists which is a prefix of this sequence; overriding kwin_xkbcommon: XKB: inet:323:58: unrecognized keysym "XF86EmojiPicker" kwin_xkbcommon: XKB: inet:324:58: unrecognized keysym "XF86Dictate" OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce 210/PCIe/SSE2 OpenGL version string: 3.1.0 NVIDIA 340.108 OpenGL shading language version string: 1.40 NVIDIA via Cg compiler Driver: NVIDIA Driver version: 340.108 GPU class: G80/G90 OpenGL version: 3.1 GLSL version: 1.40 X server version: 1.21.1 Linux kernel version: 5.19.9 Requires strict binding: no GLSL shaders: yes Texture NPOT support: yes Virtual Machine: no QObject::connect(KWin::InputMethod, KWin::EffectsHandlerImpl): invalid nullptr parameter Application::crashHandler() called with signal 11; recent crashes: 2 22 -- exe=/usr/bin/kwin_x11 13 -- platform=xcb 11 -- display=:0 17 -- appname=kwin_x11 17 -- apppath=/usr/bin 10 -- signal=11 10 -- pid=32505 18 -- appversion=5.25.5 17 -- programname=KWin 31 -- bugaddress=submit@bugs.kde.org 12 -- startupid=0 KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = kwin_x11 path = /usr/bin pid = 32505 KCrash: Arguments: /usr/bin/kwin_x11 --crashes 1 KCrash: Attempting to start /usr/lib/drkonqi QSocketNotifier: Invalid socket 4 with type Read, disabling... qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 180, resource id: 41943050, major code: 20 (GetProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 181, resource id: 41943050, major code: 20 (GetProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 180, resource id: 41943050, major code: 20 (GetProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 181, resource id: 41943050, major code: 20 (GetProperty), minor code: 0 kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:11:31: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:16:28: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:17:28: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:19:34: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:20:34: this compose sequence already exists; overriding kwin_xkbcommon: XKB: /usr/share/X11/locale/pt_BR.UTF-8/Compose:22:39: a sequence already exists which is a prefix of this sequence; overriding kwin_xkbcommon: XKB: inet:323:58: unrecognized keysym "XF86EmojiPicker" kwin_xkbcommon: XKB: inet:324:58: unrecognized keysym "XF86Dictate" load glyph failed err=6 face=0x555d09a93c50, glyph=65535 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2438, resource id: 62915265, major code: 15 (QueryTree), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2477, resource id: 62915271, major code: 15 (QueryTree), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 3023, resource id: 16777222, major code: 18 (ChangeProperty), minor code: 0 Freeze in OpenGL initialization detected Unable to start Dr. Konqi Re-raising signal for core dump handling. qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 3110, resource id: 41943046, major code: 18 (ChangeProperty), minor code: 0 Freeze in OpenGL initialization detected Unable to start Dr. Konqi Re-raising signal for core dump handling. load glyph failed err=6 face=0x555d09a93c50, glyph=65535

a-parhom commented 2 years ago

Could you please tell me what window decorations do you use?

ramon501 commented 2 years ago

I use Styleproject

a-parhom commented 2 years ago

I've fixed the nullptr reference error, but looks like Styleproject is not compatible with current KDecoration shadow API, so the outline is not going to work properly with it.

ramon501 commented 2 years ago

Thanks, the last commit helped a lot, no more crashes, i don't use the outline feature so that's fine for me

ramon501 commented 2 years ago

I use the no border kwin option for firefox, now i noticed if i do this the rounded corners are gone, maybe this is related to styleproject ?

a-parhom commented 2 years ago

I think it's possible. You can try SierraBreezeEnhanced decoration, for example, just to figure out that. Also, it is highly customizable and fully compatible with LightlyShaders (except squircled corners for now, but I'll consider implementing that and making a pull request), so maybe it will do the job for you.

ramon501 commented 2 years ago

Ok, i'll try a test, until yesterday i could use the no border on firefox just fine and the rounded corners would still work, i do that on every session instead of creating a permanent rule, the reason is if i create a no border rule for firefox the shadow around the windows is also gone and if i just use the no border option after launching firefox i get both rounded corners and windows shadow

a-parhom commented 1 year ago

2.0 code is in master branch now.