From unknown Sat Jun 14 05:06:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#38705: 26.3; set-frame-size pixelwise makes frame larger Resent-From: ynyaaa@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Dec 2019 12:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 38705@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.157701822612010 (code B ref -1); Sun, 22 Dec 2019 12:38:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Dec 2019 12:37:06 +0000 Received: from localhost ([127.0.0.1]:49153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ij0Tq-00037e-6h for submit@debbugs.gnu.org; Sun, 22 Dec 2019 07:37:06 -0500 Received: from lists.gnu.org ([209.51.188.17]:52001) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ij0Tn-00037W-VE for submit@debbugs.gnu.org; Sun, 22 Dec 2019 07:37:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35247) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ij0Tm-0008Ok-K6 for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 07:37:03 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ij0Tl-0005aF-7t for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 07:37:02 -0500 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:37232) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ij0Tk-0005V0-U8 for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2019 07:37:01 -0500 Received: by mail-pg1-x52f.google.com with SMTP id q127so7400167pga.4 for ; Sun, 22 Dec 2019 04:37:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=pLLdPuSFceREquL0A7aouhSOUHiPcR2woP3b7MtPxus=; b=kEvXf7r2d8OFUY2oWAFqtR2ahKXcRtQOG5sVuef2l1bzbGCvcSePPll32jj9eRylTy Spz6D8HvfG0ItaIOYemytAyKnLq7zD7XUwgCvaAgZ1ZOKc1iiQ5IFACJ5wOw8Tmf7Snk hOQIBmkkYXNwuaTBp6W9otRhHisu3gIOam6Cw5ng1Qh5+q+TQsQz1udHnHB2kTSY5m/p zJZEdWfch6FZOfa1fHomgIqGGgTl24T5rBUf046RCEA128mZM8NXejqPZvTM255p1WGe Jn6ec/Mx2jwYeTaY0QG8KQVCtC6fqcUbrsDfRtsPZXvbxCPRObB8EpYC0q9Utqcv4Dm/ Ixzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=pLLdPuSFceREquL0A7aouhSOUHiPcR2woP3b7MtPxus=; b=E/ZZHT+xdfubqWAAiOHbvddkwSfUVGzY636Woo5pa9/pal0Go5u/xYOtYOln3TcCOE LsyxtkB8Y5+dUTExGKowcf+vURwOnIKbAEckIWTOVPSR3G+VZgiSveWdmJuKUqEloTaz KRKxacOhySL8vjrrLKvNskvJVGhV/mZxkUgNj69/QAO/xQyl+3vEK4BhdkmmT8ZCald3 Y5d5aIDSA/96ctOd+/utipw+Z5+8g8G9Pr/dDVgTlOtdHxFHjQiS8WHlNs82NKmnP7Td sIfUk1YVTTxo4Yx/BErzV6TWTHdgM6jGs09iQKnY91ZKeCBHz96Z7h1V0SyemPHbbSZu nyjw== X-Gm-Message-State: APjAAAWLO5Wy7olcZ2X6BYvNiJIhxrfot4kR3poE8it2NrBrNYRVoypR Op7ooQI+6UwLs/Itx8uGrq6AUGXK X-Google-Smtp-Source: APXvYqxuC9Yi1W05LQGYLvROIVIZWcThc12lxB9StNreLXiXVEHDs92zL54LbyL6Nzm8pv71lft2Cg== X-Received: by 2002:a63:220b:: with SMTP id i11mr25603908pgi.50.1577018219165; Sun, 22 Dec 2019 04:36:59 -0800 (PST) Received: from HP (east42-p111.eaccess.hi-ho.ne.jp. [219.121.173.112]) by smtp.gmail.com with ESMTPSA id w20sm10849797pfi.86.2019.12.22.04.36.57 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Dec 2019 04:36:58 -0800 (PST) From: ynyaaa@gmail.com Date: Sun, 22 Dec 2019 21:36:50 +0900 Message-ID: <8636dcr0yl.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::52f X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) set-frame-size with PIXELWISE=t makes frame larger than specified value. (setq frame-resize-pixelwise t) makes no difference. (progn (set-frame-size nil 500 500 t) (list (list (frame-outer-width) (frame-pixel-width) (frame-inner-width)) (list (frame-outer-height) (frame-pixel-height) (frame-inner-height)))) =>((549 533 533) (595 536 536)) (progn (set-frame-size nil 1000 1000 t) (list (list (frame-outer-width) (frame-pixel-width) (frame-inner-width)) (list (frame-outer-height) (frame-pixel-height) (frame-inner-height)))) =>((1049 1033 1033) (1095 1036 1036)) In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 built on CIRROCUMULUS Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor 'Microsoft Corp.', version 6.3.9600 Recent messages: Making completion list... Configured using: 'configure --without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2 Important settings: value of $LANG: JPN locale-coding-system: cp932 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-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 font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow emacsbug tabify network-stream nsm starttls tls gnutls mailalias smtpmail auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs sendmail sort cus-edit wid-edit cus-start cus-load cl-extra thingatpt help-fns radix-tree info mail-extr message rmc puny seq dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader help-mode easymenu cl-print byte-opt gv bytecomp byte-compile cl-loaddefs cl-lib cconv debug rect misearch multi-isearch elec-pair time-date mule-util japan-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded 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 threads w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 153461 39548) (symbols 48 24728 1) (miscs 40 107 477) (strings 32 47512 1964) (string-bytes 1 1134114) (vectors 16 21297) (vector-slots 8 994377 94862) (floats 8 68 408) (intervals 56 1272 243) (buffers 992 19)) From unknown Sat Jun 14 05:06:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#38705: 26.3; set-frame-size pixelwise makes frame larger Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Dec 2019 10:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: ynyaaa@gmail.com, 38705@debbugs.gnu.org Received: via spool by 38705-submit@debbugs.gnu.org id=B38705.157709570128988 (code B ref 38705); Mon, 23 Dec 2019 10:09:02 +0000 Received: (at 38705) by debbugs.gnu.org; 23 Dec 2019 10:08:21 +0000 Received: from localhost ([127.0.0.1]:50583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijKdQ-0007XU-P3 for submit@debbugs.gnu.org; Mon, 23 Dec 2019 05:08:21 -0500 Received: from mout.gmx.net ([212.227.17.21]:46009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijKdP-0007XI-18 for 38705@debbugs.gnu.org; Mon, 23 Dec 2019 05:08:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577095693; bh=vt1hfgR532uqHXwmwzKxqAw8eIOcM68vtHRaB5R7+Js=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=XMs1fJJmQ0wFScVBYvLmGTzloPQMTj8VzKOGph+GLhye0nSl1KN467tdv4HCZavdF vHxkujnXmk5G2oJsbqRxiCIClw1kOaf6Q1alOS+H61OiNim0TiipfIBcdlvsC5g82t /9Ctn8QPTeUIHEzqbQyK77xqfkwSjEzQOLLaGvXQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([46.125.249.16]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N4zAy-1jjzya3Bie-010qib; Mon, 23 Dec 2019 11:08:12 +0100 References: <8636dcr0yl.fsf@gmail.com> From: martin rudalics Message-ID: <40c9e794-3873-a4a4-eaea-8a7d2f6bacc7@gmx.at> Date: Mon, 23 Dec 2019 11:08:14 +0100 MIME-Version: 1.0 In-Reply-To: <8636dcr0yl.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-AT Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:1add8O72IfvwXxqKAN3K6SHjwT+0kEs5nEGHIj9UGuxNLimSN30 5ezPJ/CBX5zQK6qUje87eoUtJnpuGpH5tkwJwdOgkDcNf1fq5+8cKB0XankISLoJZIxuyNy yYObB1NRqY1wwPJPM700LMoT6wQ2mb55OQihhZzcc/6ImWZq0EzpG4upkCeqsCOmuMkpiVM GeOahP8AzHoUf34DntopA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ZUwy+r25he8=:fyF3wPFh+ofInTHBsLkEM0 A5X4AnNXS4zTPNdBhHChLUvBxjoXS3HX46URlUqvwVnO5iJ18jjNyg0GbJw+5bIiQ385hj5zb h/fBDWB8VZKvcMB8M+urdDtEbQpJBywIO2LMEaWr9xc2mdFkCX2HbDzZTP+YpbBBWcfVEDj3X JepUj7rLax8q4l+tU1HoP55XyCiah6OApKCimeh4yU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z1RsCT85GwwQUgIYAya8ZJhZg== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > set-frame-size with PIXELWISE=t makes frame larger than specified value. > (setq frame-resize-pixelwise t) makes no difference. > > (progn (set-frame-size nil 500 500 t) > (list (list (frame-outer-width) > (frame-pixel-width) > (frame-inner-width)) > (list (frame-outer-height) > (frame-pixel-height) > (frame-inner-height)))) > =>((549 533 533) (595 536 536)) Right. But here (progn (set-frame-size nil 500 500 t) (list (list (frame-outer-width) (frame-pixel-width) (frame-inner-width) (frame-text-width)) (list (frame-outer-height) (frame-pixel-height) (frame-inner-height) (frame-text-height)))) =>((540 532 532 500) (583 536 536 500)) This is because 'set-frame-size' sets "the size of the text area of FRAME" and the size of the text area is returned by 'frame-text-width' and 'frame-text-height'. Just another Emacs idiosyncrasy ... martin From unknown Sat Jun 14 05:06:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#38705: 26.3; set-frame-size pixelwise makes frame larger References: <8636dcr0yl.fsf@gmail.com> Resent-From: ynyaaa@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Dec 2019 13:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: 38705@debbugs.gnu.org Received: via spool by 38705-submit@debbugs.gnu.org id=B38705.157719542119652 (code B ref 38705); Tue, 24 Dec 2019 13:51:01 +0000 Received: (at 38705) by debbugs.gnu.org; 24 Dec 2019 13:50:21 +0000 Received: from localhost ([127.0.0.1]:52017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijkZp-00056u-CY for submit@debbugs.gnu.org; Tue, 24 Dec 2019 08:50:21 -0500 Received: from mail-pl1-f175.google.com ([209.85.214.175]:45667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijkZn-00056f-G3 for 38705@debbugs.gnu.org; Tue, 24 Dec 2019 08:50:20 -0500 Received: by mail-pl1-f175.google.com with SMTP id b22so8488361pls.12 for <38705@debbugs.gnu.org>; Tue, 24 Dec 2019 05:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:date:message-id:mime-version; bh=/C9S2GSUF4EgIMxPrlosuvK2wWohTsx9hnx/esIG5mc=; b=sGQncRb5ri1czvt4ap8svCWCkCEaZ6FJMMd/uTFpFV+SJ2/9DSj/vVBnrJplk+mUUb ot6zlwvuGDx4JLELdS0zaDpZPGUZd/1phcFwtlbIuaRK7+KRoGOp6XEyZQBlbYlk4iBi /gkcu9d+fcjITTavbY+2QOca2kzTP5E4jfDfkdY1aAdzZpMrKbOQUptQXbgjP97J6r8W 41tPxY4fotwsTc57CML5z7WIYRR/uCGkyR/0F1Q6eVmyOBKVrCaubAVbc8hsu5wuGWxg dTA2dWJqRowJa3Vs5szyHNLlb1IDI23k/qXcb1I7O26I6LiBNC+iFaUmdX3mwmpKgzFm Q7tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :mime-version; bh=/C9S2GSUF4EgIMxPrlosuvK2wWohTsx9hnx/esIG5mc=; b=mRA9CNn9JLryft8aSHvKDlnFiouuYHZZqe6u/45+18gq63Ag9CV+J55oiTMH96MiNP c7Us/Mb+cYTX6BnMR8kv4ePOzB+pCEOqSLgGsKi9kVEsaKq42vrB/PlKtXwYvJ34AT9o lndUx4jXFwJAVbr4aoogsVbPjaswPHOEguXuZrWaOSOwzpO8Rba66nGnDKH0fN88og4t jlOyTo821Rb1MTo2R4sggm3p/nxkZfT+9gC23PvDtq707Db/pzD1EtadKf4Q2WyhblXk 892j9BQH9/pllZb2GInJihPv4SvJOfhWCHO50ABVuFh3EOSHKSA/Nw26Xb8zQseuuijc ERJg== X-Gm-Message-State: APjAAAXRC/8h1kRGQLIvfNLgwcX3hYvw4AvemL8p9pCCN9M8Qg8MC/Ps GwUAaXSrH1g5ZGNZ9EbPo+0ipVuE X-Google-Smtp-Source: APXvYqz+J0GgcuqyDmDxvf6D3Bl/0qB2SkXbl0gedl6eR+ZXZ2K2hVeAN6VmwH7ax7oO9SH41/Ap6A== X-Received: by 2002:a17:902:7288:: with SMTP id d8mr34618264pll.341.1577195413230; Tue, 24 Dec 2019 05:50:13 -0800 (PST) Received: from HP (east42-p111.eaccess.hi-ho.ne.jp. [219.121.173.112]) by smtp.gmail.com with ESMTPSA id x8sm29225504pfd.76.2019.12.24.05.50.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Dec 2019 05:50:12 -0800 (PST) From: ynyaaa@gmail.com In-Reply-To: <40c9e794-3873-a4a4-eaea-8a7d2f6bacc7@gmx.at> (martin rudalics's message of "Mon, 23 Dec 2019 11:08:14 +0100") Date: Tue, 24 Dec 2019 22:49:55 +0900 Message-ID: <86lfr1al4s.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) martin rudalics writes: > Right. But here > > (progn (set-frame-size nil 500 500 t) > (list (list (frame-outer-width) > (frame-pixel-width) > (frame-inner-width) > (frame-text-width)) > (list (frame-outer-height) > (frame-pixel-height) > (frame-inner-height) > (frame-text-height)))) > =>((540 532 532 500) (583 536 536 500)) > > This is because 'set-frame-size' sets "the size of the text area of > FRAME" and the size of the text area is returned by 'frame-text-width' > and 'frame-text-height'. Just another Emacs idiosyncrasy ... > > martin I tried to set up the frame outer size like below. ;;; sample ~/.emacs.d/init.el (defun test-set-frame-outer-size (frame width height) (set-frame-size frame width height t) (set-frame-size frame (- width (- (frame-outer-width frame) width)) (- height (- (frame-outer-height frame) height)) t)) (setq frame-inhibit-implied-resize t) (test-set-frame-outer-size nil 500 500) ;;; sample ~/.emacs.d/init.el end But the function does not work well inside init.el. After emacs started, the size is: (list (frame-outer-width) (frame-outer-height)) =>(500 502) When user input is allowed, evaluating (test-set-frame-outer-size nil 500 500) works as expected. About another point. If the frame has no menu-bar, tool-bar, scroll-bar nor fringes, frame-pixel-width and frame-pixel-height can be set by set-frame-size. But if the frame is undecorated, the outer size is as large as the size of non-undecorated frame regardless of the value of frame-inhibit-implied-resize. The inner size is enlarged to the outer size after redisplay. The size can not be set as expected. (let ((width 500) (height 500) (params '((undecorated . t) (menu-bar-lines . 0) (tool-bar-lines . 0) (horizontal-scroll-bars . nil) (vertical-scroll-bars . nil) (left-fringe . 0) (right-fringe . 0))) (f (lambda () (list (list (frame-outer-width) (frame-inner-width)) (list (frame-outer-height) (frame-inner-height)))))) (setq frame-inhibit-implied-resize t) (modify-frame-parameters nil params) (set-frame-size nil width height t) (list (funcall f) (progn (redisplay) (funcall f)))) =>(((516 500) (539 500)) ((516 516) (539 539))) If the form above is evaluated twice, the frame outer size stays 516x539 pixels and the inner size shrinks to 500x500 pixels. The inner text area is displayed at the top-left, and there are blank areas at the right and the bottom. From unknown Sat Jun 14 05:06:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#38705: 26.3; set-frame-size pixelwise makes frame larger Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Dec 2019 09:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: ynyaaa@gmail.com Cc: 38705@debbugs.gnu.org Received: via spool by 38705-submit@debbugs.gnu.org id=B38705.15772674382098 (code B ref 38705); Wed, 25 Dec 2019 09:51:01 +0000 Received: (at 38705) by debbugs.gnu.org; 25 Dec 2019 09:50:38 +0000 Received: from localhost ([127.0.0.1]:53304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ik3JO-0000Xl-8x for submit@debbugs.gnu.org; Wed, 25 Dec 2019 04:50:38 -0500 Received: from mout.gmx.net ([212.227.15.18]:50087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ik3JL-0000XR-DH for 38705@debbugs.gnu.org; Wed, 25 Dec 2019 04:50:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577267428; bh=7DpWKwPMtCThNaNfNLz0WehKKyeAauOV1hIlSCOGbjM=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=c66kOGGy6q9mQqy9X6mctEfHc2ei7UYU+4V7o4f+tTW4mqZBijeEnIOwXgvejxdf+ GRAVEiJbIAZuqlY7rgREH5qzeQekoljyxtrGKnZ8lArFUNNI5N0No8F0Mqq7otss6X gzQnTcpaPLtRQsKR3gF0tWxSuSqS0FGOs30PLrfQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([212.95.5.162]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mr9Bk-1jX5hi1fjq-00oIPt; Wed, 25 Dec 2019 10:50:28 +0100 References: <86lfr1al4s.fsf@gmail.com> From: martin rudalics Message-ID: Date: Wed, 25 Dec 2019 10:49:34 +0100 MIME-Version: 1.0 In-Reply-To: <86lfr1al4s.fsf@gmail.com> Content-Type: multipart/mixed; boundary="------------677284A934E76CC14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kd077IPk77xPUxaAy2xpPch6HM0UwZ1v7P1dcF7QfzppHslzlgORLFwYrJw2V OR8e5RZzzXAch/ibjzecmhmDfLU4J1T2X38uqhWFmlDYIJbWI35jxh+xu2TiHtx/ETDzNjyCu 0tEOsGcJmAcyITg+Mo9abWqCMDFCu25XdIarZ5xeT8oVl9sPohtYLDtNURT28Bxu/tugRsUyA fLRpBNuX/RSwpy/l0muJNBiO8nxfV8Q9Y6MxRnz04cvvs07aFjFdwpCL85waJ+hex2dTaGehM WXWxLQsEvd3aCVrW3TTcws8HcQA/CYqTb3gsoPx/XRbPIFJkpGbkmgfMbCauxa8fGgKihBPmN omjg7dDgvizSVW86djQDofbKUIHXXaLYY6JF+/p3Z4nvEAejngK4CbA0yFeVaK5UK3L0ugNNj q4+KEL1AIKWL0XZ+3S2lr36RSXbfrXeFlYKoZtGAK4IdYyJ+B6S7IqpI420vY3C1fp5yQszrc 2OSEIibPvn62CoXcvitSRsRNFYGgT524fbclBCA== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a multi-part message in MIME format. --------------677284A934E76CC14E9BE75A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > I tried to set up the frame outer size like below. > ;;; sample ~/.emacs.d/init.el > (defun test-set-frame-outer-size (frame width height) > (set-frame-size frame width height t) > (set-frame-size frame > (- width (- (frame-outer-width frame) width)) > (- height (- (frame-outer-height frame) height)) > t)) > (setq frame-inhibit-implied-resize t) > (test-set-frame-outer-size nil 500 500) > ;;; sample ~/.emacs.d/init.el end > > But the function does not work well inside init.el. > After emacs started, the size is: > (list (frame-outer-width) (frame-outer-height)) > =>(500 502) > When user input is allowed, evaluating > (test-set-frame-outer-size nil 500 500) > works as expected. Look up the function 'frame-geometry'. If its return value for something like the 'external-border-size' differs for a frame before and after "user input is allowed" then it's because that something has not been specified before the frame was "mapped" and so Emacs won't know it. If you are sure that your decorations won't change from one emacs session to the next, you can try to remember them from the last session and apply them manually. However, in general, calling 'frame-outer-width/-height' from init.el is not a good idea. > About another point. > If the frame has no menu-bar, tool-bar, scroll-bar nor fringes, > frame-pixel-width and frame-pixel-height can be set by set-frame-size. > But if the frame is undecorated, the outer size is as large as the size > of non-undecorated frame regardless of the value of > frame-inhibit-implied-resize. > The inner size is enlarged to the outer size after redisplay. > The size can not be set as expected. > (let ((width 500) (height 500) > (params '((undecorated . t) > (menu-bar-lines . 0) > (tool-bar-lines . 0) > (horizontal-scroll-bars . nil) > (vertical-scroll-bars . nil) > (left-fringe . 0) > (right-fringe . 0))) > (f (lambda () (list (list (frame-outer-width) > (frame-inner-width)) > (list (frame-outer-height) > (frame-inner-height)))))) > (setq frame-inhibit-implied-resize t) > (modify-frame-parameters nil params) > (set-frame-size nil width height t) > (list (funcall f) > (progn (redisplay) (funcall f)))) > =>(((516 500) (539 500)) ((516 516) (539 539))) > > If the form above is evaluated twice, the frame outer size stays > 516x539 pixels and the inner size shrinks to 500x500 pixels. Please note again that the values you pass to 'set-frame-size' are the values later reported by 'frame-text-width' and 'frame-text-height'. These are fictive values and neither inner, nor outer or native sizes might match these. > The inner text area is displayed at the top-left, > and there are blank areas at the right and the bottom. This is the result of a bug that made frame resizing incorrect for undecorated frames on Windows ever since. To explain why this bug usually goes unnoticed note that 'set-frame-size' causes three things to happen: (1) it asks the window manager to resize the frame's (window system) window. (2) it "prematurely" resizes the frame's windows because in their code some users want to know the new window sizes right away. Now if (1) eventually results in a frame size different from the one expected in (2), the corresponding message from the window manager will cause Emacs to (3) re-resize the frame's windows if they don't match and everything should go well. Usually, the sizes returned by the window manager match those expected by (2) and in (3) no such re-resizing is needed. But in your scenario the first (set-frame-size nil 500 500 t) call will, due to the bug, pass incorrect values to the window manager, which makes the values eventually returned by the window manager differ from those calculated in (2). (3) will fix this. But the subsequent calls will cause the window manager do nothing in (1) because it is supplied the old values again and thus will decide that no resizing is needed. Yet Emacs will perform (2) with the values it expects and these values will never be corrected because (3) will never happen. Please try the attached patch. I will install it on Emacs-27 as soon as I have upgraded my working environment, something which may happen in a couple of days only. Many thanks again for reporting these obscure behaviors, martin --------------677284A934E76CC14E9BE75A Content-Type: text/plain; charset=UTF-8; name="w32fns.c.diffs" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="w32fns.c.diffs" ZGlmZiAtLWdpdCBhL3NyYy93MzJmbnMuYyBiL3NyYy93MzJmbnMuYwppbmRleCBiZjJhN2Ez ZTU0Li44MTQ1YjgyNDE2IDEwMDY0NAotLS0gYS9zcmMvdzMyZm5zLmMKKysrIGIvc3JjL3cz MmZucy5jCkBAIC0yMTQ2LDYgKzIxNDYsOSBAQCB3MzJfc2V0X3VuZGVjb3JhdGVkIChzdHJ1 Y3QgZnJhbWUgKmYsIExpc3BfT2JqZWN0IG5ld192YWx1ZSwgTGlzcF9PYmplY3Qgb2xkX3Zh bAogCQkgICAgfCBTV1BfRlJBTUVDSEFOR0VEKTsKICAgICAgIEZSQU1FX1VOREVDT1JBVEVE IChmKSA9IGZhbHNlOwogICAgIH0KKworICBmLT5vdXRwdXRfZGF0YS53MzItPmR3U3R5bGUg PSBHZXRXaW5kb3dMb25nIChod25kLCBHV0xfU1RZTEUpOworCiAgIHVuYmxvY2tfaW5wdXQg KCk7CiB9CiAKCg== --------------677284A934E76CC14E9BE75A-- From unknown Sat Jun 14 05:06:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#38705: 26.3; set-frame-size pixelwise makes frame larger Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jan 2020 08:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: ynyaaa@gmail.com Cc: 38705@debbugs.gnu.org Received: via spool by 38705-submit@debbugs.gnu.org id=B38705.157795514811583 (code B ref 38705); Thu, 02 Jan 2020 08:53:02 +0000 Received: (at 38705) by debbugs.gnu.org; 2 Jan 2020 08:52:28 +0000 Received: from localhost ([127.0.0.1]:38059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imwDU-00030g-LL for submit@debbugs.gnu.org; Thu, 02 Jan 2020 03:52:28 -0500 Received: from mout.gmx.net ([212.227.17.22]:58417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imwDS-00030M-KV; Thu, 02 Jan 2020 03:52:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577955139; bh=Ktdn1zRxEq46EEBty65aSe/7fwgypXVpiOT4EOTFWLk=; h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To; b=Hz81QgIZQInA6lsvjwO56oN6dITtso/pmU9OwoxHto4ATj5ViT7YDcnyHR40zhxul Wak2OxzwoXXXgjyUgTI3ZERohio5gRwJ+2dD8T3PJZtPRfIX4KNSmSU1i3IEFr8fXl 3Ltr1k1A6c83fTz1FtA8lhdUMX019htqOeYE/BRc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([46.125.249.18]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MxUnp-1jfbAo3IF7-00xray; Thu, 02 Jan 2020 09:52:19 +0100 From: martin rudalics References: <86lfr1al4s.fsf@gmail.com> Message-ID: <54ee7fca-a78b-71ac-b7ae-d691fda706b4@gmx.at> Date: Thu, 2 Jan 2020 09:52:18 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-AT Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:8CPfIpH3SSpAgNxIJwiC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h2eWvbSRaMJxhL14EfGBYtk3x0rwtqQ7O6hYQ8jTJ3U3C1MCDVM3Vj9m4tjHRShB dnMEKGoUojTiBqL04EIBTffETLpzCSEWYO3ZoTGX+AL4vh4hEivFiXnTnoQfFsU7DP+KvlEFF 7/e6Yhcd9zqyKzTSI43xycyaZlre60TfFNdh7xaoYD4DKFtWU6DAR6/v779D62KqBIztOwd1L aS2szlaDJw6s2gbgR4N5wP43pnNO69Kkl8jbxUAkh8/MBrj7xlvdQb6t9dc3dA5uU2RFgP5/Q YrVjgGLVlS4hnYplQSgBUrpgBvqVy8K1x/2iRrlGlt2CM+Jxyc5tRtIX1Z5NBzH988J6CXA/I GFQetRQqVTVSe1JdQAWal64LTiLjGsvl0RYFG3HQ/CJGjt1wAlELUzPQNnZcAthYVOBYynbR2 +Ae3KU6VT6Kw7t75dvhJlgL97dVM4u97gdUBMxA== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 38705 fixed close 38705 27.1 quit > Please try the attached patch. I will install it on Emacs-27 as soon > as I have upgraded my working environment, something which may happen > in a couple of days only. Installed. Closing this bug. Thanks again for the report, martin