From db6b141bf0acb9a45ef07a50d80b27c8d724ad07 Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Fri, 13 Dec 2019 00:05:09 -0300 Subject: [PATCH] backend-rdp: report a zero physical size to compositor The RDP-backend is reporting a non-zero physical size value, and there are some clients that get the resolution in pixels directly from the physical size reported. This leads to a resolution of 25.4 PPI (or 1px/1mm), which is too small. But there's no need for that. The physical size is reported on enabling the output (in the case of RDP-backend we have no information about it before this), and the resolution is already set in this moment. Report a zero physical size to compositor, what makes frontend and clients use their default values and applications become readable. Signed-off-by: Leandro Ribeiro --- libweston/backend-rdp/rdp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libweston/backend-rdp/rdp.c b/libweston/backend-rdp/rdp.c index 6e26770c..ca26c751 100644 --- a/libweston/backend-rdp/rdp.c +++ b/libweston/backend-rdp/rdp.c @@ -526,8 +526,9 @@ rdp_output_set_size(struct weston_output *base, wl_list_for_each(head, &output->base.head_list, output_link) { weston_head_set_monitor_strings(head, "weston", "rdp", NULL); - /* XXX: Calculate proper size. */ - weston_head_set_physical_size(head, width, height); + /* This is a virtual output, so report a zero physical size. + * It's better to let frontends/clients use their defaults. */ + weston_head_set_physical_size(head, 0, 0); } wl_list_init(&output->peers);