Package: emacs24
Version: 24.4+1-5
Severity: important

I have a 15 inch 3K laptop monitor. As such, I must use HiDPI settings or my
applications will have unusably small text. Using gnome-tweak-tool I set the
Window HiDPI setting to 2. This causes GTK apps to have scaled fonts and
widgets and generally to be usable on a high resolution monitor.

However, when HiDPI mode is enabled, Emacs window geometry gets very screwy.
First, new Emacs frames consume the entire desktop real estate, instead of the
default 80 characters wide, 35 characters tall. Second, certain widgets that
are placed proportionally across the frame, such as the scrollbar, appear
missing or weirdly rendered.

I finally realized that while the Emacs text editing area displays fonts in the
correct size, the Emacs window geometry thinks that the fonts should be much
larger and therefore makes the frame too large. For example, the default frame
has a text area 80 characters wide by 35 characters tall, plus a little extra
window space for borders, scroll bars, etc. This should take up a little over
1/4 of my 3K screen. However, I realized that the Emacs window geometry thinks
that the entire 3K screen is not big enough to display 80x35 characters, so it
consumes the whole screen. However, Emacs text rendering is correctly sized and
is able to actually write 200 characters per line onto that jumbo area.

Note that I have tested this bug by removing my ~/.emacs and ~/.emacs.d/ so
that I used system defaults. I tested hypothesis by creating an empty .emacs
and adding:

(add-to-list 'default-frame-alist '(width  . 40))
(add-to-list 'default-frame-alist '(height . 20))

At those settings, the frame visibly smaller, but still took almost the whole
screen, so I tried:

(add-to-list 'default-frame-alist '(width  . 20))
(add-to-list 'default-frame-alist '(height . 10))

At these settings, the frame could now hold 89x37 lines of text and consumed
about 1/3 of my screen, so I figured that would be close enough to what I
wanted. But this demostrates that the window geometry is off by about a factor
of approximately (but not equal to) 4 in each direction.

The scroll bar does not appear to exist in a default emacs frame, because it's
actually rendered off screen. If you split the window right (C-x 3) you see a
scrollbar appear partially obscuring the right-text-area. However, this
scrollbar scrolls the left-text-area. This is because Emacs window geometry
believes that where the scroll bar is is the right-side of the left text area,
when in fact it's way too far to the right. When you are editing the right-
text-area, the left-text-area's scrollbar is partially obscuring your text and
you can't see a scrollbar that affects the right-text-area, because that
scrollbar is rendered off screen. This scrollbar disfunction scales whether I
use the default frame size, or my "20x10" frame.

Note that a work-around for this screwy behaviour is to use emacs24-lucid,
which displays properly. Nevertheless, assuming that the GTK port of Emacs is
to be maintained (and preferred, given that it's the default) going forward,
this needs to get fixed, because high resolution displays are only becoming
more common.

I'm not sure if I can attach images to a Debian bug report, but if I can, I
will try to draw on some images to show what I am talking about.



-- System Information:
Debian Release: stretch/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'stable-updates'), (500, 
'testing'), (500, 'stable'), (100, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_DK.UTF-8@corusa, LC_CTYPE=en_DK.UTF-8@corusa (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages emacs24 depends on:
ii  emacs24-bin-common     24.4+1-5
ii  gconf-service          3.2.6-3
ii  libacl1                2.2.52-2
ii  libasound2             1.0.28-1
ii  libatk1.0-0            2.16.0-2
ii  libc6                  2.19-18
ii  libcairo-gobject2      1.14.2-2
ii  libcairo2              1.14.2-2
ii  libdbus-1-3            1.8.18-1
ii  libfontconfig1         2.11.0-6.3
ii  libfreetype6           2.5.2-4
ii  libgconf-2-4           3.2.6-3
ii  libgdk-pixbuf2.0-0     2.31.4-2
ii  libgif4                4.1.6-11
ii  libglib2.0-0           2.44.1-1
ii  libgnutls-deb0-28      3.3.15-7
ii  libgomp1               5.1.1-9
ii  libgpm2                1.20.4-6.1+b2
ii  libgtk-3-0             3.16.4-2
ii  libice6                2:1.0.9-1+b1
ii  libjpeg62-turbo        1:1.4.0-7
ii  libm17n-0              1.6.4-3
ii  libmagickcore-6.q16-2  8:6.8.9.9-5
ii  libmagickwand-6.q16-2  8:6.8.9.9-5
ii  libotf0                0.9.13-2
ii  libpango-1.0-0         1.36.8-3
ii  libpangocairo-1.0-0    1.36.8-3
ii  libpng12-0             1.2.50-2+b2
ii  librsvg2-2             2.40.9-2
ii  libselinux1            2.3-2+b1
ii  libsm6                 2:1.2.2-1+b1
ii  libtiff5               4.0.3-13
ii  libtinfo5              5.9+20150516-2
ii  libx11-6               2:1.6.3-1
ii  libxft2                2.3.2-1
ii  libxinerama1           2:1.1.3-1+b1
ii  libxml2                2.9.1+dfsg1-5
ii  libxpm4                1:3.5.11-1+b1
ii  libxrandr2             2:1.4.2-1+b1
ii  libxrender1            1:0.9.8-1+b1
ii  zlib1g                 1:1.2.8.dfsg-2+b1

emacs24 recommends no packages.

Versions of packages emacs24 suggests:
ii  emacs24-common-non-dfsg  24.4+1-2

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to