diff options
-rw-r--r-- | sway/config/output.c | 4 | ||||
-rw-r--r-- | sway/desktop/output.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 9da009bb..12a875b7 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -260,7 +260,7 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { | |||
260 | 260 | ||
261 | bool modeset_success; | 261 | bool modeset_success; |
262 | if (oc && oc->width > 0 && oc->height > 0) { | 262 | if (oc && oc->width > 0 && oc->height > 0) { |
263 | sway_log(SWAY_DEBUG, "Set %s mode to %dx%d (%f GHz)", oc->name, oc->width, | 263 | sway_log(SWAY_DEBUG, "Set %s mode to %dx%d (%f Hz)", oc->name, oc->width, |
264 | oc->height, oc->refresh_rate); | 264 | oc->height, oc->refresh_rate); |
265 | modeset_success = | 265 | modeset_success = |
266 | set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate); | 266 | set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate); |
@@ -329,7 +329,7 @@ static void default_output_config(struct output_config *oc, | |||
329 | wl_container_of(wlr_output->modes.prev, mode, link); | 329 | wl_container_of(wlr_output->modes.prev, mode, link); |
330 | oc->width = mode->width; | 330 | oc->width = mode->width; |
331 | oc->height = mode->height; | 331 | oc->height = mode->height; |
332 | oc->refresh_rate = mode->refresh; | 332 | oc->refresh_rate = mode->refresh / 1000.f; |
333 | } | 333 | } |
334 | oc->x = oc->y = -1; | 334 | oc->x = oc->y = -1; |
335 | oc->scale = 1; | 335 | oc->scale = 1; |
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; |