From: Jindřich Makovička Date: Sat, 29 May 2021 07:44:39 +0000 (+0200) Subject: * src/pgtkterm.c: Honor system DPI settings X-Git-Tag: emacs-29.0.90~3692 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c6ada6e9f1f82d36a05ecc49844e9400e0da8fdd;p=emacs.git * src/pgtkterm.c: Honor system DPI settings --- diff --git a/src/pgtkterm.c b/src/pgtkterm.c index e4bf7ba6bd4..13bd442ad95 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -6984,8 +6984,11 @@ pgtk_term_init (Lisp_Object display_name, char *resource_name) { GdkScreen *gscr = gdk_display_get_default_screen (dpyinfo->gdpy); - gdouble dpi = 96.0 * pgtk_text_scaling_factor(); - gdk_screen_set_resolution (gscr, dpi); + gdouble dpi = gdk_screen_get_resolution (gscr); + if (dpi < 0) + dpi = 96.0; + + dpi *= pgtk_text_scaling_factor(); dpyinfo->resx = dpi; dpyinfo->resy = dpi; }