pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
467 stars 83 forks source link

Rearranging tiled windows with mouse is awkward due to timing dependence #711

Open peterkrull opened 1 month ago

peterkrull commented 1 month ago

When initiating a tile-rearrange with the mouse using the Super + Left-click drag, there seems to be a time-delay before windows start to rearrange. This means it is impossible to quickly rearrange windows just by a quick flick of the mouse. Another issue is, even after the timeout, the mouse must move a tiny amount, before the rearrange triggers. If the mouse is moved and held still, it will just return to its original position.

https://github.com/user-attachments/assets/e54d1f05-ac75-465f-93fc-c4f0c8ae0b5d

Is this delay necessary? If it is, could it be made configurable/disable-able?

peterkrull commented 1 month ago

I have found that removing the overdue check makes this problem significantly better: https://github.com/pop-os/cosmic-comp/blob/master/src/shell/layout/tiling/mod.rs#L3548-L3564

And it makes the animations more responsive. Perhaps the animations can be visually a bit more jarring, but I think it is a good tradeoff for the sake of responsiveness and usability.

https://github.com/user-attachments/assets/db4cfb72-7d67-4a47-8a02-cfaeb19bb572

Of course this does make the animations a bit more jumpy. However, I believe it should be solved not by slowing down the users ability to interact with the UI, but instead by adjusting the animation system to present any rapid moves gracefully.