--- xfce4-settings-4.12.0.orig/dialogs/display-settings/xfce-randr.c +++ xfce4-settings-4.12.0/dialogs/display-settings/xfce-randr.c @@ -628,7 +628,7 @@ xfce_randr_preferred_mode (XfceRandr *ra { if (n < randr->priv->output_info[output]->npreferred) dist = 0; - else if (randr->priv->output_info[output]->mm_height != 0) + else if (randr->priv->output_info[output]->mm_height != 0 && gdk_screen_height_mm () != 0) dist = (1000 * gdk_screen_height () / gdk_screen_height_mm () - 1000 * randr->priv->modes[output][n].height / randr->priv->output_info[output]->mm_height);