From 3c3e5f3b88325d71307ea6a603995b30344adcbb Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 6 Aug 2019 20:55:54 +0100 Subject: [PATCH] randr - use ints for mode info w/h as we want signed ints for a diff fixes warning too. --- src/bin/e_comp_x_randr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_x_randr.c b/src/bin/e_comp_x_randr.c index 4b3bd8082..569dd897f 100644 --- a/src/bin/e_comp_x_randr.c +++ b/src/bin/e_comp_x_randr.c @@ -418,8 +418,8 @@ _mode_screen_find(Ecore_X_Window root, E_Randr2_Screen *s, Ecore_X_Randr_Output refresh = (double)minfo->dotClock / (double)(minfo->hTotal * minfo->vTotal); diff = - (100 * abs(s->config.mode.w - minfo->width)) + - (100 * abs(s->config.mode.h - minfo->height)) + + (100 * abs(s->config.mode.w - (int)minfo->width)) + + (100 * abs(s->config.mode.h - (int)minfo->height)) + fabs((100 * s->config.mode.refresh) - (100 * refresh)); if (diff < distance) {