--- Begin Message ---
Subject: |
emacs make system blocked if "Xft/DPI = -1" in xsettings |
Date: |
Tue, 28 Jul 2015 13:58:28 +0800 |
Hi, everyone.
I found that emacs could not compute a right dpi value if "Xft/DPI =
-1" in xsettings. The document said "Xft/DPI" is an integer, and "-1"
is the default value [1].
And in the code of src/xsettings.c:parse_settings(), all the interger
value in xsettings are converted to CARD32(unsigned int). So if
Xft/DPI is "-1", emacs will convert it to uint(4294967295), and owns a
huge dpi(4294967295/1024=4194303). Its so huge that will make system
blocked.
Here is the code snippets in
emacs24-24.5+1/src/xsettings.c:parse_settings() from debian/sid:
....
420: CARD32 vlen, ival = 0;
....
544: else if (strcmp (name, "Xft/DPI") == 0)
545: {
546: settings->seen |= SEEN_DPI;
547: settings->dpi = (double)ival/1024.0;
548: }
[1] http://www.freedesktop.org/wiki/Specifications/XSettingsRegistry/
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#21152: emacs make system blocked if "Xft/DPI = -1" in xsettings |
Date: |
Sun, 09 Aug 2015 23:24:52 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 |
Xu Fasheng wrote:
tha patch works. I rebuild emacs and tested ok.
Thanks, I installed it in the Emacs master and am marking this as done.
--- End Message ---