aboutsummaryrefslogtreecommitdiff
path: root/rootston/output.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-01-18 16:36:49 +0100
committeremersion <contact@emersion.fr>2018-01-18 16:36:49 +0100
commit7c11d3e372769c4ec596d7c82a3207e65454dffe (patch)
tree2fde3961d3bc608d06bfdb5d0ffdb74e1b653786 /rootston/output.c
parent96d6f34eddbd0159e347d41e5c20c74a0600e878 (diff)
rootston: fix repaint timer for outputs with refresh rate
Diffstat (limited to 'rootston/output.c')
-rw-r--r--rootston/output.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/rootston/output.c b/rootston/output.c
index 846bb4e6..086e120d 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -273,11 +273,11 @@ static void output_handle_frame(struct wl_listener *listener, void *data) {
// TODO: fullscreen
if (!pixman_region32_not_empty(&output->damage) &&
!wlr_output->needs_swap) {
- int refresh = wlr_output->refresh;
- if (refresh <= 0) {
- refresh = 60;
+ float hz = wlr_output->refresh / 1000.0f;
+ if (hz <= 0) {
+ hz = 60;
}
- wl_event_source_timer_update(output->repaint_timer, 1000.0f / refresh);
+ wl_event_source_timer_update(output->repaint_timer, 1000.0f / hz);
goto clear_damage;
}