aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorLibravatar Andri Yngvason <andri@yngvason.is>2020-07-18 15:56:43 +0000
committerLibravatar Simon Ser <contact@emersion.fr>2020-07-18 18:21:51 +0200
commitab8ded626b5d0e9c59495b0988be4077b605d3a2 (patch)
tree4a7f295113f571eb8b916ea053e9afddcf9b97e4 /sway/desktop/output.c
parentcontrib/_incr_version: Disallow the "v"-prefixed version format (diff)
downloadsway-ab8ded626b5d0e9c59495b0988be4077b605d3a2.tar.gz
sway-ab8ded626b5d0e9c59495b0988be4077b605d3a2.tar.zst
sway-ab8ded626b5d0e9c59495b0988be4077b605d3a2.zip
desktop: output: Scale custom output refresh rate
This fixes an issue with wlr-output-management causing the frame rate to jump to 60000 Hz when setting a custom mode.
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 5fdaba68..90653fa1 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -996,7 +996,8 @@ static void output_manager_apply(struct sway_server *server,
996 } else { 996 } else {
997 oc->width = config_head->state.custom_mode.width; 997 oc->width = config_head->state.custom_mode.width;
998 oc->height = config_head->state.custom_mode.height; 998 oc->height = config_head->state.custom_mode.height;
999 oc->refresh_rate = config_head->state.custom_mode.refresh; 999 oc->refresh_rate =
1000 config_head->state.custom_mode.refresh / 1000.f;
1000 } 1001 }
1001 oc->x = config_head->state.x; 1002 oc->x = config_head->state.x;
1002 oc->y = config_head->state.y; 1003 oc->y = config_head->state.y;