y4my4my4m / kde-shader-wallpaper

KDE / Plasma - Shader Wallpaper plugin
GNU General Public License v3.0
224 stars 12 forks source link

Causes lag when snapping windows and other random stuff when desktop is visible #30

Open GanerCodes opened 2 years ago

GanerCodes commented 2 years ago

I have no idea why it happens but if I have shader desktop enabled snapping windows causes a big stutter to my system

GanerCodes commented 2 years ago

Example:

https://user-images.githubusercontent.com/34655998/154803846-eaa1ffb7-fa19-4cea-a9c3-a5e1eadac922.mp4

y4my4my4m commented 2 years ago

@GanerCodes which version are you running? 2.0.1a?

also, is Pause teh shader when covered by maximized or full-screen windows on? image

If so, turn it off and see...

I've been working towards refactoring the whole thing, but my gut feeling is that the shader gets restarted many times for no good reason (because of the shader editing code). Maybe start plasmashell from a shell session so you can read the log output and see if it says QML Shader restarted everytime it snaps.

Edit: love your avatar btw, let's get this day started!

GanerCodes commented 2 years ago

It seems the shader restarts every time I let go of a window. There's also a kwin error that pops up if I go over the snaps too much. Same thing happens regardless of compatibility mode and full-screen pausing Example

Also thanks haha

y4my4my4m commented 2 years ago

@GanerCodes

I'm not surer if this helps anything but i've applied a hotfix to fix this error: image

Try it from the master branch how-to

GanerCodes commented 2 years ago

Hey, I actually solved this issue by switching GPUs lol. Nvidia was causing an absolute plethora of issues on my system involving UI/UX and on AMD I have almost none.

Also, on an unrelated note is there some way to make it so only fullscreen programs pause the shader? When coding I have a transparent window and I can see my Desktop however I'd rather the shader not run if I'm playing a fullscreen game.

y4my4my4m commented 2 years ago

@GanerCodes Yes, sorry the UI is crap right now. Working on it on the #25 PR but, if you make the window larger you should see this checkbox option:

image

GanerCodes commented 2 years ago

I'm refering to pausing the shader only when covered with fullscreen windows, not maximised

y4my4my4m commented 2 years ago

@GanerCodes

https://github.com/y4my4my4m/kde-shader-wallpaper/blob/db55dd3ab183d31d3c4cd6a5204b84dde176bb74/contents/ui/Components/ShaderEngine.qml#L272

Yes, this should be easy to do by removing this conditional: || appWindow.IsMaximized and only keeping appWindow.IsFullScreen Will add as a feature in the refactored version, for now you will have to edit it yourself and load the plugin from source.