bismuth
bismuth copied to clipboard
fix windows unable to move between screens
Summary
Currently on recent (?) versions of kwin we don't rearrange the tiles correctly when kwin moves windows between monitors instantaneously (versus dragging by mouse) and instead we arrange the moved window back to its original location. This PR fixes that.
~~I don't think this is the right way to fix it, but since the fix is reported to work and the bug is reported to be severe, I think we should do this for now. I'm currently investigating what changed about the events we receive from kwin. I think there are some other event-related issues too like for example when moving windows between activities or desktops, so I think a wider solution is needed here like maybe finding some missing events.~~
Test Plan
- try moving a window between screens using a kwin keyboard shortcut
- without this PR, the previous step fails
Related Issues
Closes #370, closes #374
Actually the problem is that kwin gives a frameGeometryChanged signal right before the screenChanged signal and we're currently handling the frameGeometryChanged signal by forcing the window back to its tiled geometry.
I don't know what the previous behavior of kwin was before this broke but I've tested as old as kwin 5.21.4 and it still has the bug.
Anyway I've finished going over the signal handling and I pushed an update.
Indeed that one line is the problem. KWin changes a window's size before moving it between screens, so we can't react to a geometry change by always changing it back.
Hi, @benemorius - Thank you for helping fix issues lately. I was just testing this fix, but unfortunately, this doesn't fix on my system. And it's for Google Chrome and Microsoft Edge. Firefox, and other windows are all fine. I have shared more in the linked issue, would you know what's going wrong?
This PR fixes the problem for me. Without it, the only way I can move windows around on kwin 5.25 is to float -> move -> unfloat.
This one fixed my problem on X11. I'm too lazy to compile, so I just copy-pasted code to usr/share/kwin/scripts/bismuth/contents/code/index.mjs
Solved it for me too. Cloning the current master branch and merging this fix gets me the desired behavior.
git clone https://github.com/Bismuth-Forge/bismuth.git
cd bismuth
git remote add benemorius https://github.com/benemorius/bismuth.git
git fetch benemorius
git checkout -b <new_branch>
git merge benemorius/pr/fix/kwin-move-windows-between-screens
make setup-dev-env
[...] # rest of build instructions
This really needs to be merged. Not being able to move windows to other screens from the keyboard is a deal breaker.
Can this please get another look? This bug has been an issue for weeks by now with a fix available but not being merged.
Are there still no plans to merge this pr?
I have been using this fix for a month and I haven't got any bugs. Without this, I wouldn't use Bismuth because this is happening for most electron apps.
Since the OP is not active, I applied the fixes I requested in a separate PR: #419
(In other words: the issue is fixed).