From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#23966: 25.1.50; Frame resizing due to tool bar + Gnus Date: Thu, 14 Jul 2016 11:01:39 +0200 Message-ID: <578754F3.9060800@gmx.at> References: <87vb09u40u.fsf@gmx.net> <57867BB6.1020601@gmx.at> <87r3axtkcf.fsf@gmx.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1468486952 31924 80.91.229.3 (14 Jul 2016 09:02:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Jul 2016 09:02:32 +0000 (UTC) Cc: 23966@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 14 11:02:21 2016 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 1bNcXD-0005Uo-Uw for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Jul 2016 11:02:20 +0200 Original-Received: from localhost ([::1]:52370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNcXD-00043c-AC for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Jul 2016 05:02:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNcX2-00041N-M5 for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2016 05:02:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNcWw-0003y8-NU for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2016 05:02:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNcWw-0003y4-Ji for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2016 05:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bNcWw-0008Sc-89 for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2016 05:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2016 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23966 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23966-submit@debbugs.gnu.org id=B23966.146848690932501 (code B ref 23966); Thu, 14 Jul 2016 09:02:02 +0000 Original-Received: (at 23966) by debbugs.gnu.org; 14 Jul 2016 09:01:49 +0000 Original-Received: from localhost ([127.0.0.1]:50519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNcWj-0008S9-D0 for submit@debbugs.gnu.org; Thu, 14 Jul 2016 05:01:49 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:50159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNcWg-0008Rq-PI for 23966@debbugs.gnu.org; Thu, 14 Jul 2016 05:01:47 -0400 Original-Received: from [192.168.1.100] ([212.95.7.23]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0M3igT-1b5ocn1zFp-00rDIj; Thu, 14 Jul 2016 11:01:40 +0200 In-Reply-To: <87r3axtkcf.fsf@gmx.net> X-Provags-ID: V03:K0:Pa9/FQGkIkRbKgYrTFrOKbgXm3a3WpSm2eTyxdN2rUcsXZ4xO44 /qrHc7CI1AuJryj0tZSY5T4AIrVXpVIdHsr3YiJg0tAeIs+SYa36TxnVuxL4iunte7cGNs9 kloOcpfcAkdMDgyf9SOCzG93ldSEGAgXZSPULDQkLv5MKh1MgPXeyRyLBS87LJ8jdjRzEpL UvR2qZA0b+a6xt35yDtJQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:uxrizLxTsEA=:mC+RraiAa8s+D/ZjjlmbE9 86hZVbxAu/i4CnOhef7o/QzyQEXx3zSpSY54XylTNvvR+h72xDytdIY1B/R+lQDwJ99S1Otuw S+EHpZ++t8S2WHA+skENkX3AEJEsY2mntcYJbIIZsaprFmYTq77bygHosnDQAgfa0BqtW+ErI PqZSvBHnTEwOJDD9dgHz+onOqVqUrAT9VAEwIeyXgIBAPmeGxbmYeR+ozZTu25bjjNqEKxKDj 3zT/p3j4oyrpVHRAnWKXRbO2iC4gsk6wQT+VH+mYKm21jQzqTYvAW1jHA9BNniiNiHAQaX1ey 9Np6IzT1WiIFFWJ2K2hQ3D5jbjIA9ZpEIfcNP9PL1Nwd3Y3J+z9YWEnp/yauGlPBiCMu0zu4s CYhdCQTllXrMCXNFZwObPJ+sqMpEkn4YafoB2tujlKNbg1RY9pVncsbTIqgF+ijgSnRoPC9ne HsTywEnTm/A92kytvH433vs2HlqRLGlSlgETp8HNHvZG7O/fP8orgcP4JxX3b8ScGLzLGouv2 otnhevCasU9T/X7gp8ozropFm85iu+CYc8ZDTB1YnLEEUC9V9Mlr5jEcuMm0SrFTw8j3wBmFW V4nxiHc7eEGm5dyw0H5ogMu2YYS9B57b1CTvmXHvWhjX9dYPs95mt4P6pe7ThpMi7ZN7SaXGm 4KYnv+Jf59J3sK968XQBmaiajYPNF3PZBh07WVophoH7TMpajwvK4OUUvePBSC5LnGKsP/7Si vF8r6WQ+th3LUaQnbkA9it45XBwvLYkBPnAVYYNhMCd+LFdjfLkc67cXpiEThCXhadDwp0hg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:121060 Archived-At: > I did in fact see this lack of height change, but only once among the > probably dozens of times I executed that code before filing the bug > report; I was surprised but since I couldn't reproduce it, I thought i= t > was a fluke. All the other times, *Messages* showed this with emacs-2= 5 > and master: > > Emacs started; frame height: 36 > Gnus started; frame height: 36 > Reading /home/steve/.newsrc.eld... > Opening nnfolder server on archive...done > No new newsgroups > Checking new news... > Reading active file via nnnil...done > Reading active file from archive via nnfolder...done > Reading active file via nndraft...done > Checking new news...done > Opening nndoc server on /home/steve/tool-bar-Gnus-frame-bug...done > Tool bar disabled; frame height: 36 > Entered Summary buffer; frame height: 36 > Tool bar enabled; frame height: 36 > Other buffer; frame height: 38 > Back to Summary buffer; frame height: 38 =E2=80=98frame-height=E2=80=99 is not necessarily a reliable reflection o= f what you see on screen. > With 24.5 the frame height numbers were 35 (five times) followed by 37= > (twice). > > When the tool bar was enabled in the Gnus Summary buffer, did you see = it > displayed as I describe in the OP: an empty 8-pixel high strip? No. I see a 35-pixel high strip. With the following definitions adapted from yours (defun gtk-tool-bar-height (&optional frame) (let* ((frame (window-normalize-frame frame)) (geometry (frame-geometry frame))) (cddr (assq 'tool-bar-size geometry)))) (let ((testfile "~/tool-bar-Gnus-frame-bug")) (with-temp-file testfile (insert "From nobody Wed Jul 13 13:55:54 CEST 2016 To: stephen.berman@gmx.net Subject: bug test message From: Stephen Berman Date: Wed Jul 13 13:55:54 CEST 2016 Message-ID: <87twg9y16a.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=3Dus-ascii Lines: 1 test ")) (sit-for 0.1) (message "Emacs started; frame pixel height: %d toolbar= height: %d" (frame-pixel-height) (gtk-tool-bar-height)) (require 'gnus) (let ((gnus-select-method '(nnnil ""))) (sit-for 0.1) (message "Gnus started; frame pixel height: %d toolba= r height: %d" (frame-pixel-height) (gtk-tool-bar-height)) (gnus-1) (gnus-group-make-doc-group testfile 'mbox) (tool-bar-mode -1) (sit-for 0.1) (message "Tool bar disabled; frame pixel height: %d t= oolbar height: %d" (frame-pixel-height) (gtk-tool-bar-height)) (sit-for 1) (gnus-group-select-group) (sit-for 0.1) (message "Entered Summary buffer; frame pixel height: = %d toolbar height: %d" (frame-pixel-height) (gtk-tool-bar-height)) (sit-for 1) ;; Uncommenting these three lines and commenting out the same three ;; lines above results in a normal tool bar and no resizing. ;; (tool-bar-mode -1) ;; (sit-for 0.1) (message "Tool bar disabled; frame pixel height: %d= toolbar height: %d" (frame-pixel-height) (gtk-tool-bar-height)) ;; (sit-for 1) (tool-bar-mode 1) (sit-for 0.1) (message "Tool bar enabled; frame pixel height: %d to= olbar height: %d" (frame-pixel-height) (gtk-tool-bar-height)) (sit-for 3) (switch-to-buffer (other-buffer)) (sit-for 0.1) (message "Other buffer; frame pixel height: %d toolba= r height: %d" (frame-pixel-height) (gtk-tool-bar-height)) (sit-for 3) (switch-to-buffer (other-buffer)) (sit-for 0.1) (message "Back to Summary buffer; frame pixel height: = %d toolbar height: %d" (frame-pixel-height) (gtk-tool-bar-height))) (sit-for 3) ;; Suppress further messages and clean up in order to repeat the test ;; simply by evaluating this sexp. (let (message-log-max) (gnus-summary-exit-no-update t) (goto-char (point-min)) (gnus-group-kill-group) (let ((gnus-expert-user t)) (gnus-group-quit)) (delete-file testfile) (when (file-exists-p (gnus-dribble-file-name)) (delete-file (gnus-dribble-file-name)))) (sit-for 0.1) (message "Final; frame pixel height: %d toolbar height:= %d" (frame-pixel-height) (gtk-tool-bar-height)) (sit-for 5) (switch-to-buffer "*Messages*")) and `eval-buffer' of these in an emacs -Q of the release version I get Emacs started; frame pixel height: 648 toolbar height: 44 Gnus started; frame pixel height: 648 toolbar height: 44 Opening nnfolder server on archive...done No new newsgroups Checking new news... Reading active file via nnnil...done Checking new news...done No news is good news Opening nndoc server on /home/martin/tool-bar-Gnus-frame-bug...done Tool bar disabled; frame pixel height: 648 toolbar height: 0 Entered Summary buffer; frame pixel height: 648 toolbar height: 0 Tool bar enabled; frame pixel height: 657 toolbar height: 35 Other buffer; frame pixel height: 648 toolbar height: 44 Back to Summary buffer; frame pixel height: 657 toolbar height: 35 Final; frame pixel height: 648 toolbar height: 44 You can run the command =E2=80=98eval-buffer=E2=80=99 with M-x ev-b RET Final; frame pixel height: 648 toolbar height: 44 So the "empty strips" here have a height of 35 pixels while the "normal" toolbar has 44 pixels. BTW, before getting the "Tool bar enabled" message I briefly see some toolbar contents flashing and getting erased immediately thereafter. The entire frame height doesn't change here probably due to rounding and size hints. However, when I set `frame-resize-pixelwise' to t it changes as follows: Emacs started; frame pixel height: 648 toolbar height: 44 Gnus started; frame pixel height: 648 toolbar height: 44 Opening nnfolder server on archive...done No new newsgroups Checking new news... Reading active file via nnnil...done Checking new news...done No news is good news Opening nndoc server on /home/martin/tool-bar-Gnus-frame-bug...done Tool bar disabled; frame pixel height: 648 toolbar height: 0 Entered Summary buffer; frame pixel height: 648 toolbar height: 0 Tool bar enabled; frame pixel height: 657 toolbar height: 35 Other buffer; frame pixel height: 657 toolbar height: 44 Back to Summary buffer; frame pixel height: 666 toolbar height: 35 Final; frame pixel height: 666 toolbar height: 44 So the pixel height of my frame has increased by 18 (2 times 9 pixels from the difference between 44 and 35). What do you get with my modifications? martin