Closed diogogmatos closed 2 months ago
I can't reproduce with the steps you have provided on my system with the latest KDE Plasma 6.1.0 . For me the windows stay tiled with the correct gaps.
What happens if you use the Grid Tiling: Refresh
global shortcut after the gaps are incorrect?
What version are you using?
Thanks for the quick reply!
Here are my system details:
Operating System: Arch Linux KDE Plasma Version: 6.1.1 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.2 Kernel Version: 6.9.6-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 7840HS with Radeon 780M Graphics Memory: 13.3 GiB of RAM Graphics Processor: AMD Radeon 780M Manufacturer: LENOVO Product Name: 83AM System Version: IdeaPad Pro 5 14APH8
I'm on Plasma 6.1.1 and not 6.1.0, I don't know if that could be what's causing the issue. Here's my configuration of the script itself:
Blacklist: ksmserver-logout-greeter|krunner|spectacle|slimbookbattery|java|minecraft-launcher|xwaylandvideobridge|xdg-desktop-portal-kde|xdg-desktop-portal|systemsettings|plasmashell|plasma-emojier|steam|steam-runtime
Min Space 1: inkscape|krita|gimp|designer|creator|kdenlive|Discord|slack
Min Space 2: code|kdevelop
Here's a short screen record demonstrating the issue. And to answer your question, when I use the Grid Tiling: Refresh
shortcut the windows are positioned with the correct gaps again (as you can see in the video in the last few moments), however the panel stays not-floating (maybe because the windows are too close to it?).
https://github.com/lingtjien/Grid-Tiling-Kwin/assets/80540164/b390ae74-edd9-471e-8a5e-bb1de57a6d6b
There were some changes in the Scripting logic of KWin with this latest version:
Find the full changelog here.
Thank you for your time!
I'm also running Arch, I'll update my system and check it out. Thank you for the detailed report
Try the dev branch (not sure it'll solve your problem). Also not really sure if I like this solution, but didn't have a better idea at this time, maybe I'll come up with something better later. (This fix also prevents fullscreening, so I should fix that also if I do decide to go this way, but let's see if this fixes your problem at all)
Also on a side note, which widget provides the virtual desktop pager using only dots? (the most left widget in the right section in your top panel) It looks nice.
Hey! Tested it and it seems to be behaving exactly the same :/
https://github.com/lingtjien/Grid-Tiling-Kwin/assets/80540164/4d8ca0d4-01e1-4c1d-82b7-27fda4e580b2
Also just to clarify, this only happens when the panel is set to 'Floating', works perfectly otherwise.
Thanks! It's this one with these custom characters for indicators:
Active Dot: ●
Inactive Dot: ⚬
Also, you still couldn't recreate the bug after updating your system?
I could reproduce it by setting my panel to floating and then opening a single window and switching between virtual desktops. What I implemented was basically a force geometry, which fixed the problem for me.
In the new video you don't seem to be switching between virtual desktops?
Also, just to be sure but after updating you have to restart your system (or relog) and depending on how you installed it you may have to copy files again if you didn't symlink during install.
If you open a video player and fullscreen it what happens?
Hey!
I tested again after restarting my system (I hadn't done that) and yes it fixed the problem! (kinda)
Now when I do these steps:
The window stays with the correct gaps. However, it does a weird jitter (I assume from trying to do the force geometry thing) when switching. I captured it in this video:
https://github.com/lingtjien/Grid-Tiling-Kwin/assets/80540164/03dab3a3-99f1-4f3f-8439-d0270d21e8f8
The jittering only happens when the panel is set to floating.
I tried to play something in full screen and it indeed prevents it. The full screen window stays in the same position.
In my previous video I was switching virtual desktops yes, you can see it by looking at the dots indicator that you talked about.
I installed the script how you describe in the README, and I can confirm I have the files 'symlinked' to where I have the repository.
Thank you for all your time and patience!
P.S. In the previous version (for Plasma 5) if I had the panel floating it would stay floating even with windows open (i.e. it wouldn't move up like it does now), it would be cool if you could make that happen here too. Maybe if you managed to do that the problem with the windows wouldn't happen (?) because they seem to move up because the panel is moving too. Just some food for thought.
The jittering only happens when the panel is set to floating
I don't think I can prevent the jittering and I also don't observe the jitter on my system. The flloating panel detects that a window is close and then goes back to non floating, which causes other windows to shift. Ideally the KWin scripting API would provide a callback for when the clientArea changes but I haven't found that one in the source code yet. I'll make a ticket with the KDE devs, seems like the only real solution to me.
In the previous version (for Plasma 5) if I had the panel floating it would stay floating even with windows open (i.e. it wouldn't move up like it does now), it would be cool if you could make that happen here too. Maybe if you managed to do that the problem with the windows wouldn't happen (?) because they seem to move up because the panel is moving too. Just some food for thought.
That is not my code, the kde devs that made the panel, have implemented the floating feature of the panel.
The issue is that when a window comes too close, the floating panel stops floating, so you could increase the margin top in the configuration to keep more distance between your windows and the panel and this fixes the floating and unfloating of the panel and subsequently also prevents the unwanted movement of windows. But that is less elegant because that leads to wasted screen real estate. More ideally you would like to decrease or the disable the automatic unfloating feature of the floating panel. If that is what you desire then you should request that with the dev of the plasma panel.
I put the force geometry in a config flag (default off) you can turn it on in the config and I fixed the prevention of fullscreening windows. I will ask the KDE devs if it is possible to provide a signal for when the clientArea changes, other than that I can't do much else about this https://bugs.kde.org/show_bug.cgi?id=489859
Did you have time to give it a try?
Hey there! Sorry for the late response. I haven't had a time yet but I'll give it a try and let you know.
Thank you so much for your help/work!
Hey! I completely forgot to update you on this, sorry 😅 I tried it and it does seem to fix the issue of the window moving around. Sometimes it shows a weird jitter in the window that I guess happens when it is "forcing" the window into the correct position, but functional!
Thank you for the feedback, merged back to master.
Hey!
I finally updated to plasma 6 and the script seems to be working fine, however it seems to have problems when the kde panel is set to "floating". When changing virtual desktops, the windows will move slightly upwards and then down again, ending up being flush with the panel (with no gap between the panel and the windows). Also, the panel doesn't float when windows are open, as if they were in fullscreen.
Any idea why?
Steps to reproduce:
Thank you for your time!