From f56ce11aa0d872464ef6d9601b09022e8e68ecd7 Mon Sep 17 00:00:00 2001 From: Timidger Date: Thu, 28 Dec 2017 10:36:18 -0600 Subject: Fixes #535 send mode info on DRM refresh once When DRM refreshed, wlr_output_set_mode is called. It would then call the DRM set_mode callback which sends the updated matrix and mode info. However once that call completed it would then immediantly send the information again. This is handled poorly by xwayland, causing it to scale up the clients twice. --- types/wlr_output.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/types/wlr_output.c b/types/wlr_output.c index 115f3e8b..b6f35da8 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -163,16 +163,7 @@ bool wlr_output_set_mode(struct wlr_output *output, if (!output->impl || !output->impl->set_mode) { return false; } - bool result = output->impl->set_mode(output, mode); - if (result) { - wlr_output_update_matrix(output); - - struct wl_resource *resource; - wl_resource_for_each(resource, &output->wl_resources) { - wlr_output_send_current_mode_to_resource(resource); - } - } - return result; + return output->impl->set_mode(output, mode); } bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width, -- cgit v1.2.3 From 6e9cef4ed69100241a52b158539d7be9ec413c55 Mon Sep 17 00:00:00 2001 From: Timidger Date: Thu, 28 Dec 2017 11:12:26 -0600 Subject: Don't send custom mode info twice on DRM refresh --- types/wlr_output.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/types/wlr_output.c b/types/wlr_output.c index b6f35da8..46db98b3 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -171,16 +171,7 @@ bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width, if (!output->impl || !output->impl->set_custom_mode) { return false; } - bool result = output->impl->set_custom_mode(output, width, height, refresh); - if (result) { - wlr_output_update_matrix(output); - - struct wl_resource *resource; - wl_resource_for_each(resource, &output->wl_resources) { - wlr_output_send_current_mode_to_resource(resource); - } - } - return result; + return output->impl->set_custom_mode(output, width, height, refresh); } void wlr_output_update_mode(struct wlr_output *output, -- cgit v1.2.3