From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#20432: GDK_SCALE=2 GDK_DPI_SCALE=0.5 destroys GTK+ 3 scroll bar Date: Thu, 14 May 2015 13:34:18 +0200 Message-ID: <5554883A.9060501@swipnet.se> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1431603326 12122 80.91.229.3 (14 May 2015 11:35:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 May 2015 11:35:26 +0000 (UTC) To: "Felix E. Klee" , 20432-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 14 13:35:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YsrQ1-000055-7q for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 May 2015 13:35:13 +0200 Original-Received: from localhost ([::1]:53921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsrQ0-000454-CM for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 May 2015 07:35:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsrPw-00041V-F3 for bug-gnu-emacs@gnu.org; Thu, 14 May 2015 07:35:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsrPs-00038G-DM for bug-gnu-emacs@gnu.org; Thu, 14 May 2015 07:35:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsrPs-00037k-98 for bug-gnu-emacs@gnu.org; Thu, 14 May 2015 07:35:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YsrPr-0008DR-TG for bug-gnu-emacs@gnu.org; Thu, 14 May 2015 07:35:04 -0400 Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 May 2015 11:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 20432 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 20432@debbugs.gnu.org, jan.h.d@swipnet.se, felix.klee@inka.de Original-Received: via spool by 20432-done@debbugs.gnu.org id=D20432.143160327031527 (code D ref 20432); Thu, 14 May 2015 11:35:02 +0000 Original-Received: (at 20432-done) by debbugs.gnu.org; 14 May 2015 11:34:30 +0000 Original-Received: from localhost ([127.0.0.1]:44487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YsrPJ-0008CQ-9f for submit@debbugs.gnu.org; Thu, 14 May 2015 07:34:30 -0400 Original-Received: from mailfe01.swip.net ([212.247.154.1]:54411 helo=swip.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YsrPG-0008C9-Q6 for 20432-done@debbugs.gnu.org; Thu, 14 May 2015 07:34:28 -0400 X-T2-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 Original-Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 579181819; Thu, 14 May 2015 13:34:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102771 Archived-At: 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)) > >