[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 86a297a: Work around reporting a dpi change in ap
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] emacs-25 86a297a: Work around reporting a dpi change in apply_xft_settings |
Date: |
Thu, 22 Dec 2016 07:36:21 +0000 (UTC) |
branch: emacs-25
commit 86a297a43d614f11df5a8ec051879ec3af51e679
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>
Work around reporting a dpi change in apply_xft_settings
* src/xsettings.c (apply_xft_settings): Don't report a change
when dpi settings do not differ substantially.
---
src/xsettings.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/xsettings.c b/src/xsettings.c
index d7af68f..10afd7d 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -667,8 +667,23 @@ apply_xft_settings (struct x_display_info *dpyinfo,
}
#endif
- if ((settings->seen & SEEN_DPI) != 0 && oldsettings.dpi != settings->dpi
- && settings->dpi > 0)
+ if ((settings->seen & SEEN_DPI) != 0
+ && settings->dpi > 0
+ /* The following conjunct avoids setting `changed' to true when
+ old and new dpi settings do not differ "substantially".
+ Otherwise, the dynamic-setting Elisp code may process all sorts
+ of unrelated settings that override users' font customizations,
+ among others. Compare:
+
+ http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00557.html
+ http://lists.gnu.org/archive/html/bug-gnu-emacs/2016-12/msg00820.html
+
+ As soon as the dynamic-settings code has been tested and
+ verified, this Emacs 25.2 workaround should be removed. */
+ && ((oldsettings.dpi >= settings->dpi
+ && (oldsettings.dpi - settings->dpi) > 2)
+ || ((settings->dpi > oldsettings.dpi)
+ && (settings->dpi - oldsettings.dpi) > 2)))
{
FcPatternDel (pat, FC_DPI);
FcPatternAddDouble (pat, FC_DPI, settings->dpi);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 86a297a: Work around reporting a dpi change in apply_xft_settings,
Martin Rudalics <=