Skip to content

Commit

Permalink
Fix smooth animation on Wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
matinlotfali committed May 9, 2024
1 parent 4753cfd commit 895a1a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ShapeCornersWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ constexpr void clamp(float& value, const float& delta, const float& config) {
}

bool ShapeCornersWindow::animateProperties(std::chrono::milliseconds time) {
auto deltaTime = static_cast<float>((time - m_last_time).count());
auto deltaTime = std::clamp(static_cast<float>((time - m_last_time).count()), 1.0f, 1000.0f);
m_last_time = time;

// find the destination value
Expand Down

0 comments on commit 895a1a5

Please sign in to comment.