diff options
author | Danilo Spinella <danyspin97@protonmail.com> | 2019-10-20 23:10:39 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-10-21 14:22:20 +0200 |
commit | a5b6f40937a1f7630ec484bd2485b0b0f5f91c20 (patch) | |
tree | 84554982c63372dfb097c9dcbc24572b9cd9e1ed /sway/desktop/output.c | |
parent | focus: support focus_wrapping workspace (diff) | |
download | sway-a5b6f40937a1f7630ec484bd2485b0b0f5f91c20.tar.gz sway-a5b6f40937a1f7630ec484bd2485b0b0f5f91c20.tar.zst sway-a5b6f40937a1f7630ec484bd2485b0b0f5f91c20.zip |
Fix refresh rate scale of output
When applying config, value mode->refresh is mHz; convert it to Hz before
assigning it to the temporary output config. oc->refresh_rate will
be converted back to mHz in set_mode function.
Fix debug log printing GHz instead of Hz.
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 36e406c3..42194d54 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -856,7 +856,7 @@ void handle_output_manager_apply(struct wl_listener *listener, void *data) { | |||
856 | struct wlr_output_mode *mode = config_head->state.mode; | 856 | struct wlr_output_mode *mode = config_head->state.mode; |
857 | oc->width = mode->width; | 857 | oc->width = mode->width; |
858 | oc->height = mode->height; | 858 | oc->height = mode->height; |
859 | oc->refresh_rate = mode->refresh; | 859 | oc->refresh_rate = mode->refresh / 1000.f; |
860 | } else { | 860 | } else { |
861 | oc->width = config_head->state.custom_mode.width; | 861 | oc->width = config_head->state.custom_mode.width; |
862 | oc->height = config_head->state.custom_mode.height; | 862 | oc->height = config_head->state.custom_mode.height; |