aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-26 05:45:55 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-26 05:45:55 +0000
commit6e909d5cd3e996f4d7800fa9539060aa0d037df8 (patch)
tree8365d82449134b6db5ee70daa734e0e59f2d47e2
parentterm: store current font DPI as a float instead of an integer (diff)
term: use the monitors diagonal DPI value, instead of it's vertical PPI value
-rw-r--r--terminal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/terminal.c b/terminal.c
index d7f05c30..1a560ef2 100644
--- a/terminal.c
+++ b/terminal.c
@@ -587,14 +587,14 @@ get_font_dpi(const struct terminal *term)
double dpi = 0.0;
assert(term->window != NULL);
tll_foreach(term->window->on_outputs, it) {
- if (it->item->ppi.scaled.y > dpi)
- dpi = it->item->ppi.scaled.y * term->scale;
+ if (it->item->dpi > dpi)
+ dpi = it->item->dpi;
}
/* If we're not mapped, use DPI from first monitor. Hopefully this is where we'll get mapped later... */
if (dpi == 0.) {
tll_foreach(term->wl->monitors, it) {
- dpi = it->item.ppi.scaled.y * term->scale;
+ dpi = it->item.dpi;
break;
}
}