]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/pgtkterm.c: Honor system DPI settings
authorJindřich Makovička <makovick@gmail.com>
Sat, 29 May 2021 07:44:39 +0000 (09:44 +0200)
committerYuuki Harano <masm+github@masm11.me>
Sun, 30 May 2021 10:40:02 +0000 (19:40 +0900)
src/pgtkterm.c

index e4bf7ba6bd40756cd9431736f41e76a27a00b554..13bd442ad95bafaf4aa4a33f4064b2172a863185 100644 (file)
@@ -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;
   }