randr - use ints for mode info w/h as we want signed ints for a diff

fixes warning too.
This commit is contained in:
Carsten Haitzler 2019-08-06 20:55:54 +01:00
parent d0dc774673
commit 3c3e5f3b88
1 changed files with 2 additions and 2 deletions

View File

@ -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)
{