Workspace swipe doesn't render snap to delta 0 #11163
-
|
I've been experiencing weird behaviour with workspace swipe in a very particular context since I've been using Hyprland (0.45.2) How to reproduce:
You should see that the workspace is not rendered at the right place, it's offset to the right, and won't move if you continue swiping left. When you're in that state (still holding your swipe which doesn't render), you can observe two weird behaviours:
Video demonstration: out2.mp4I added some debug logs in The problem is that if you weren't already at delta 0, then you don't see that your delta got reset to 0, so if then you continue swiping (even very slowly) to get things back into place, any swipe you attempt in this direction will be blocked because internally you're already at delta 0. This also explains why when start swiping the other way it first snaps into place and then moves (the first frame adds your delta to the internal 0 to get a positive (near 0) delta which makes this jump Observed on 0.50.1, and also as far back as 0.45.2 (yes I did actually run 0.45.2 again today to make sure it also happens there)
Relevant gestures config: Also reproducible by having |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Seems to be fixed by such a patch: diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp
index f957c96e..d1a94cde 100644
--- a/src/managers/input/Swipe.cpp
+++ b/src/managers/input/Swipe.cpp
@@ -241,6 +241,8 @@ void CInputManager::updateWorkspaceSwipe(double delta) {
(m_activeSwipe.delta < 0 && m_activeSwipe.pWorkspaceBegin->m_id <= workspaceIDLeft)) {
m_activeSwipe.delta = 0;
+ g_pHyprRenderer->damageMonitor(m_activeSwipe.pMonitor.lock());
+ m_activeSwipe.pWorkspaceBegin->m_renderOffset->setValueAndWarp(Vector2D(0.0, 0.0));
return;
} |
Beta Was this translation helpful? Give feedback.
PR open with this patch in #11184