aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-07-01 22:51:21 +0900
committerLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-07-02 08:03:41 +0900
commitdf494a7e517281f21fde265bc31badae3245bb26 (patch)
treecfc08afd9a3c3081ecf1f9f1d65284c9ebddc0b0 /sway
parentworkspace_next_name: fix string length for ws_num >= 100 (diff)
downloadsway-df494a7e517281f21fde265bc31badae3245bb26.tar.gz
sway-df494a7e517281f21fde265bc31badae3245bb26.tar.zst
sway-df494a7e517281f21fde265bc31badae3245bb26.zip
transaction_apply: use float for quotient
Pre-dividing 1000/60 would lose 2/3 due to round-up Found through static analysis
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/transaction.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index d2932c87..cb524999 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -186,8 +186,8 @@ static void transaction_apply(struct sway_transaction *transaction) {
186 (now.tv_nsec - commit->tv_nsec) / 1000000.0; 186 (now.tv_nsec - commit->tv_nsec) / 1000000.0;
187 float ms_total = ms_arranging + ms_waiting; 187 float ms_total = ms_arranging + ms_waiting;
188 wlr_log(L_DEBUG, "Transaction %p: %.1fms arranging, %.1fms waiting, " 188 wlr_log(L_DEBUG, "Transaction %p: %.1fms arranging, %.1fms waiting, "
189 "%.1fms total (%.1f frames if 60Hz)", transaction, 189 "%.1fms total (%.1f frames if 60Hz)", transaction,
190 ms_arranging, ms_waiting, ms_total, ms_total / (1000 / 60)); 190 ms_arranging, ms_waiting, ms_total, ms_total / (1000.0f / 60));
191 } 191 }
192 192
193 // Apply the instruction state to the container's current state 193 // Apply the instruction state to the container's current state