Open T3sT3ro opened 5 days ago
Hi, thank you for reporting this bug!
It does happen all the time right? Doesn't matter if you grab on the right or on the left?
Uh, since I haven't GNOME 42.9 and I can't reproduce the problem, I have another question: does it happen even if the window IS NOT maximized? Thank you, let's fix this!
Hi, thank you for reporting this bug!
It does happen all the time right? Doesn't matter if you grab on the right or on the left?
Yes, it happens all the time, although the window is offset to the left, so grabbing by the right side makes it more visible. I noticed that there is a certain region starting from around the midpoint of the titlebar going all the way to the right that makes the bug appear, dragging be the left half of the titlebar seems to work OK.
does it happen even if the window IS NOT maximized?
It happens when I drag the window from any "snapped" position, be it a corner quarter area, maximized, or even the center area in the 1:3:1 vertical layout
As for the repro: maybe you could try reproducing it on a bootable ubuntu from USB or from a VM somehow?
I have some intuition about why this might be happening: The window that is in the snapped area has certain width, and when it's dragged by the titlebar it's reverting to it's original size. So when the window was initially smaller, and got stretched by snapping to the bigger area (maximized or to a corner area), the mouse "pivot/drag point" is calculated from the area width, and that is then used to offset the now smaller window. I tried eyeball testing it and it seems to be that: when the window is dragged by the title bar from it's snapped position it snaps to the left edge of it's layout area instead, but it should snap to the mouse instead
Thank you for the details, you're awesome! I tried to run a VM, but I didn't get it working for some reasons.
Thanks to the details you shared, I tried to implement a bug fix (but without testing it on GNOME 42). I will try again later this day to run a VM with GNOME 42 (probably Fedora 36).
Ok, it is NOT fixed ahahha I'm able to assign the right offset to the window when it is grabbed, but then for some reasons unknown to me, GNOME 42 reassigns again the old position (which has a bad offset). Indeed in this video, the window gets positioned in the right place for a moment and then its position is set back with a wrong offset. The first time, the position is assigned by Tiling Shell, while the second time by GNOME.
Screencast from 2024-06-28 18-25-19.webm
I'm sorry to say that this needs more time to be fixed. I'm happy that, thanks to you, I can reproduce the problem! Hope to have news soon.
Meanwhile, you can disable from the preferences the feature "Restore window size", that puts the window back to the old size, so you can enjoy Tiling Shell without this bug!
@T3sT3ro I made a bug fix, which solves the problem on my VM with GNOME 42. I leave here the files with the bugfix, so you can try it in advance. If you do, please let me know if it solves the problem!
Hello, I tested the zip you sent and it looks like the initial issue is solved!
I noticed another, maybe related bug, however: if you click and move the mouse fast enough, the window can still be offset for some reason. Almost as if the window position was calculated on a different frame than the drag start. The attached video shows this case in the third attempt (around 00:12, first two attempts look OK)
https://github.com/domferr/tilingshell/assets/5300963/2c607a14-fb80-4110-9a7f-492027357d5c
Thank you @T3sT3ro for testing this out, I'm happy that the main bug is solved. Thanks for the video!
Describe the bug When I try to drag a window by titlebar from the maximized view or from a quarter tiling, the mouse is offset to the right relatively to the window it's dragging.
To Reproduce Steps to reproduce the behavior:
Screenshots https://github.com/domferr/tilingshell/assets/5300963/1115008a-0b52-4e68-980d-73c778780d92
Information (please complete the following):