zeroxoneafour / polonium

Autotile manager for Plasma 6
https://zeroxoneafour.github.io/polonium/
MIT License
936 stars 18 forks source link

[Bug]: some tiled windows become "stuck" to a single monitor in a multi-monitor setup #177

Open sleeplessKomodo opened 3 months ago

sleeplessKomodo commented 3 months ago

Before you make the issue, confirm that

Describe the bug

Basically, I use my pc, opening apps, changing virtual desktops, and eventually, a window will remain "stuck", to where other windows can be dragged without issue, but a single window will remain stuck. I can un-tile the window, and then move it to another desktop, and then re-tile it as a temporary workaround, but it's still a nuisance in an otherwise fantastic kwin script!

To reproduce

It's not easy to reproduce this bug, because it seems to only occur after my PC has been awake and running for approx. more than 8 hours. As per the instructions to restart kwin and check logs, I'll wait until the end of today to see if anything will be logged.

Expected behavior

I would expect the tiled windows to be draggable across multiple desktops, so long as polonium is running and active.

Log output

> journalctl --user --no-pager -e | grep -i "polonium"

Jun 12 11:03:52 nobara kwin_wayland[8574]: file:///home/jimbo/.local/share/kwin/scripts/polonium/contents/code/main.mjs:2711: TypeError: Cannot read property 'isTiled' of undefined
Jun 12 11:03:52 nobara kwin_wayland[8574]: file:///home/jimbo/.local/share/kwin/scripts/polonium/contents/code/main.mjs:2711: TypeError: Cannot read property 'isTiled' of undefined

Screenshots and videos

https://github.com/zeroxoneafour/polonium/assets/82418204/e962a571-7de6-4c71-a900-f75b4d37ea50

Additional context

Operating System: Nobara Linux 39 KDE Plasma Version: 6.0.5 KDE Frameworks Version: 6.2.0 Qt Version: 6.6.2 Kernel Version: 6.8.12-200.fsync.fc39.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 3700X 8-Core Processor Memory: 31.3 GiB of RAM Graphics Processor: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2

In-line commented 3 months ago

This seems to be KWin bug, as it happens more frequently on 6.1 KDE release.

Basically window.output contains wrong screen.

It's happening reliably on my system with one 1080p screen and another 1440p screen.

In-line commented 3 months ago

I created a ticket for KWin https://bugs.kde.org/show_bug.cgi?id=488898

In-line commented 3 months ago

Well, I debugged and fixed the issue https://invent.kde.org/plasma/kwin/-/merge_requests/5960

Hopefully it should fix all Windows jumping around between monitors.

You can pretty much compile than replace your kwin_wayland executable. It should work with 6.1 release.