ecore_x: accept -1 as valid mm size for no change

If we pass in w_mm = h_mm = -1 we want no change if w == cw and h == ch,
as we calculate w_mm and h_mm based on these later.
This commit is contained in:
Sebastian Dransfeld 2013-11-05 10:54:23 +01:00
parent 144d124445
commit 3dc5eb16cc
1 changed files with 3 additions and 1 deletions

View File

@ -638,7 +638,9 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root, int w, int h, int w_m
ecore_x_randr_screen_current_size_get(root, &cw, &ch, &cwmm, &chmm);
/* compare to the values passed in. if there are no changes, get out */
if ((w == cw) && (h == ch) && (w_mm == cwmm) && (h_mm == chmm))
if ((w == cw) && (h == ch) &&
((w_mm == -1) || (w_mm == cwmm)) &&
((h_mm == -1) || (h_mm == chmm)))
return EINA_TRUE;
/* get the current size range */