GNU bug report logs - #20432
GDK_SCALE=2 GDK_DPI_SCALE=0.5 destroys GTK+ 3 scroll bar

Previous Next

Package: emacs;

Reported by: "Felix E. Klee" <felix.klee <at> inka.de>

Date: Sun, 26 Apr 2015 17:28:02 UTC

Severity: normal

Done: Jan Djärv <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#20432: closed (GDK_SCALE=2 GDK_DPI_SCALE=0.5 destroys GTK+ 3
 scroll bar)
Date: Thu, 14 May 2015 11:35:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 14 May 2015 13:34:18 +0200
with message-id <5554883A.9060501 <at> swipnet.se>
and subject line Re: bug#20432: GDK_SCALE=2 GDK_DPI_SCALE=0.5 destroys GTK+ 3 scroll bar
has caused the debbugs.gnu.org bug report #20432,
regarding GDK_SCALE=2 GDK_DPI_SCALE=0.5 destroys GTK+ 3 scroll bar
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
20432: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20432
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "Felix E. Klee" <felix.klee <at> inka.de>
To: bug-gnu-emacs <at> gnu.org
Subject: GDK_SCALE=2 GDK_DPI_SCALE=0.5 destroys GTK+ 3 scroll bar
Date: Sun, 26 Apr 2015 11:01:09 +0100
I'm running Emacs on high DPI screen, and for scaling icons and other UI
elements in GTK+ applications, I've set in the environment:

    GDK_SCALE=2
    GDK_DPI_SCALE=0.5

This, however, confuses EMACS: The scrollbar gets squished.



In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2)
 of 2015-04-20 on bitzer.hoetzel.info
Windowing system distributor `The X.Org Foundation', version 11.0.11701000
System Description: Arch Linux

Configured using:
 `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
Quit
Making completion list...
Quit
scroll-up-command: End of buffer

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message idna format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils help-mode easymenu time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 74597 8753)
 (symbols 48 17662 0)
 (miscs 40 64 138)
 (strings 32 9283 4419)
 (string-bytes 1 253558)
 (vectors 16 8988)
 (vector-slots 8 384078 17367)
 (floats 8 64 222)
 (intervals 56 183 16)
 (buffers 960 13)
 (heap 1024 24992 889))


[Message part 3 (message/rfc822, inline)]
From: Jan Djärv <jan.h.d <at> swipnet.se>
To: "Felix E. Klee" <felix.klee <at> inka.de>, 20432-done <at> debbugs.gnu.org
Subject: Re: bug#20432: GDK_SCALE=2 GDK_DPI_SCALE=0.5 destroys GTK+ 3 scroll
 bar
Date: Thu, 14 May 2015 13:34:18 +0200
Hi.

Den 2015-04-26 12:01, Felix E. Klee skrev:
> I'm running Emacs on high DPI screen, and for scaling icons and other UI
> elements in GTK+ applications, I've set in the environment:
>
>      GDK_SCALE=2
>      GDK_DPI_SCALE=0.5
>
> This, however, confuses EMACS: The scrollbar gets squished.

This GTK feature is very poorly designed.  We can not support it correctly, as 
we don't use Gtk+ exclusively.  There is a race between Gtk+ and the window 
manager and Emacs that will result in different frame sizes on frame creation. 
 Sometimes its the default size (80x34), sometimes its twice as big.

Also, the Gtk+ code blindly multiplies anything with GTK_SCALE.  So for 
example, given GTK_SCALE=2, if we have font size 15, it becomes 30.  But in 
order to compensate for this multiplication we need to divide with 2 before 
passing sizes to Gtk+.  So 15 becomes 7 (integer division), which Gtk+ turns 
to 14.  So there will be glitches, live with it.

But at least we draw things correctly in the trunk now.

	Jan D.

>
>
>
> In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2)
>   of 2015-04-20 on bitzer.hoetzel.info
> Windowing system distributor `The X.Org Foundation', version 11.0.11701000
> System Description: Arch Linux
>
> Configured using:
>   `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
>   --localstatedir=/var --with-x-toolkit=gtk3 --with-xft
>   'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
>   --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2
>   LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'
>
> Important settings:
>    value of $LANG: en_US.UTF-8
>    locale-coding-system: utf-8-unix
>
> Major mode: Fundamental
>
> Minor modes in effect:
>    tooltip-mode: t
>    electric-indent-mode: t
>    mouse-wheel-mode: t
>    tool-bar-mode: t
>    menu-bar-mode: t
>    file-name-shadow-mode: t
>    global-font-lock-mode: t
>    blink-cursor-mode: t
>    auto-composition-mode: t
>    auto-encryption-mode: t
>    auto-compression-mode: t
>    buffer-read-only: t
>    line-number-mode: t
>    transient-mark-mode: t
>
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
> Making completion list...
> Quit
> Making completion list...
> Quit
> scroll-up-command: End of buffer
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort gnus-util mail-extr emacsbug message idna format-spec
> rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
> mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
> mm-util help-fns mail-prsvr mail-utils help-mode easymenu time-date
> tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
> x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
> newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
> select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
> frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
> tai-viet lao korean japanese hebrew greek romanian slovak czech european
> ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
> simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
> files text-properties overlay sha1 md5 base64 format env code-pages mule
> custom widget hashtable-print-readable backquote make-network-process
> dbusbind gfilenotify dynamic-setting system-font-setting
> font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
>
> Memory information:
> ((conses 16 74597 8753)
>   (symbols 48 17662 0)
>   (miscs 40 64 138)
>   (strings 32 9283 4419)
>   (string-bytes 1 253558)
>   (vectors 16 8988)
>   (vector-slots 8 384078 17367)
>   (floats 8 64 222)
>   (intervals 56 183 16)
>   (buffers 960 13)
>   (heap 1024 24992 889))
>
>



This bug report was last modified 10 years and 94 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.