From 1f61fd48feb118f4b78fc9a810aeba83c16c2c35 Mon Sep 17 00:00:00 2001 From: Alistair Buxton Date: Wed, 18 Sep 2019 01:32:09 +0100 Subject: [PATCH] Initialize crtc->scalex and crtc->scaley with 1 These values are being used uninitialized in some cases, which means they have value 0. This results in display settings thinking the monitors have size 0x0, which causes bad things to happen. Fix this by initializing them to 1 when the struct is created. --- xfsettingsd/displays.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c index 2efefa8e..27e98b8d 100644 --- a/xfsettingsd/displays.c +++ b/xfsettingsd/displays.c @@ -1119,6 +1119,8 @@ xfce_displays_helper_list_crtcs (XfceDisplaysHelper *helper) crtc->height = crtc_info->height; crtc->x = crtc_info->x; crtc->y = crtc_info->y; + crtc->scalex = 1.0; + crtc->scaley = 1.0; crtc->noutput = crtc_info->noutput; crtc->outputs = NULL; -- 2.17.1