From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 11:42:52 2021 Received: (at submit) by debbugs.gnu.org; 2 May 2021 15:42:52 +0000 Received: from localhost ([127.0.0.1]:43379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldEFA-0004Dt-4Z for submit@debbugs.gnu.org; Sun, 02 May 2021 11:42:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:33200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldEF7-0004Dn-1R for submit@debbugs.gnu.org; Sun, 02 May 2021 11:42:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldEF6-0001x7-QK for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 11:42:48 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:39768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldEF4-00015z-I7 for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 11:42:48 -0400 Received: by mail-pf1-x42d.google.com with SMTP id c17so2455719pfn.6 for ; Sun, 02 May 2021 08:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:mail-followup-to:date:message-id:mime-version; bh=hgNDZn8HMPZyLlkmoRSoOI36gyrasgs60VnS4mvwwig=; b=hjqTTmeVuFnIZlpU0zf4Hs7IhjeIlKkPZeVVZ+lt/KxVMpA2un9ffNvuwyHMNTBduJ EU54uOl67bq/P46KRtNZyCFl/McP5FTDR7pCEgdsnyELsmwvq70wRIjUPQYpzbp0nW8l e3MI4yk+0U4ZvJrM8bNe1LeRgyjuO7NWaIDWLX1A8uoQWejjPv8qw1L/nWe4beXy+JFZ C9i3dt4p0O8UdHdLwR76R9Xxnu5XijVBVpxTl9BRJY+37x6YYrN/gEJJC9ZJi3FOhi3S 4COec3Pfc0HOLL9pys0PODnCda5Cv7tpeHRaWu2fr7neCyz8jYU0Fz3eRnua2/1Mmw5E Jbuw== 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:mail-followup-to:date:message-id :mime-version; bh=hgNDZn8HMPZyLlkmoRSoOI36gyrasgs60VnS4mvwwig=; b=bw5mc32MaWy3iUIwTqiDZQNBK2FZXol64ZQCgRe+lrGEZr3NJokpSVChOsVwiYaVHw Vt6bjOau74BKTspCFfd9ABnvDn1HKoZgBfJcndU5cpneuVxouuC7FWg+h08Gz8UedEnJ s8toDUcZkmmDXUzRFBYT7ion6i1qR192062Y5WyhaTl4+FkVuLcbfdMr8PN7ilBHMJxt iSG5+YgkyVS3NfMUAAp5prJUul5oN7rYPWXlOU2ktYHWS/lScFV45C69PoNazZD8k19r PXVeljsBBCtZFy/pltofFMMWsg7myaSV+g8iRFgpXkSEqqAiV5y4fGiOkp8lCBea26fd 0JMA== X-Gm-Message-State: AOAM531sTjfwwvLCHa5OLwyXVSbAbAJL2nrtzReBoFgWQ/LdxcxcVfbB Kp6fHJ1AHhRRLlZaTsgiQKfO9s8fE6gj5w== X-Google-Smtp-Source: ABdhPJxWvkJWbtUZoeH/NSGUDvil3UXsN3u3IBBpWK4KojRx1VBcOBJyP5Xz1GYwejVbWTE2giblEw== X-Received: by 2002:aa7:8a87:0:b029:27d:a1e:bc71 with SMTP id a7-20020aa78a870000b029027d0a1ebc71mr14490685pfc.14.1619970164429; Sun, 02 May 2021 08:42:44 -0700 (PDT) Received: from mb2.local ([2405:201:5c06:708a:fc15:1705:e681:86b]) by smtp.gmail.com with ESMTPSA id j7sm6764373pfd.129.2021.05.02.08.42.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 08:42:44 -0700 (PDT) From: Pankaj Jangid To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Resizing using set-frame-width doesn't expand mode-line Mail-Followup-To: bug-gnu-emacs@gnu.org Date: Sun, 02 May 2021 21:12:41 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=2607:f8b0:4864:20::42d; envelope-from=pankaj@codeisgreat.com; helo=mail-pf1-x42d.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: submit 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: -3.1 (---) This is occurring on MacOS build. Branch: master. Steps: 1. ./src/emacs -Q 2. M-x set-frame-width RET 160 RET Result: Frame size is increased but mode-line still has original width. Probably one of these commits caused the issue: a65eb23f5cbf1ff408585574e4c95a9eebf2a9dc 6b2d017ead856c244a0b5c5a162254094877bc54 In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.4.0, NS appkit-2022.44 Version 11.3 (Build 20E232)) of 2021-05-02 built on mb2.local Repository revision: a65eb23f5cbf1ff408585574e4c95a9eebf2a9dc Repository branch: HEAD Windowing system distributor 'Apple', version 10.3.2022 System Description: macOS 11.3 Configured features: ACL DBUS GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Group Minor modes in effect: gnus-undo-mode: t savehist-mode: t desktop-save-mode: t shell-dirtrack-mode: t direnv-mode: t TeX-PDF-mode: t override-global-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-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 buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort emacsbug gnus-cite mail-extr flyspell ispell gnus-async gnus-ml hl-line disp-table nndraft nnmh utf-7 nnml nnfolder epa-file gnutls network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache .gnus ebdb-message sendmail ebdb-gnus gnus-msg conf-mode vc-mtn vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs eglot array filenotify jsonrpc ert pp ewoc debug backtrace xref flymake-proc flymake warnings project elec-pair display-line-numbers vc-git ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr wid-edit ol-docview doc-view jka-compr image-mode exif dired dired-loaddefs ol-bibtex bibtex ol-bbdb ol-w3m init savehist desktop frameset ob-plantuml ob-sql ob-css ob-js ob-java ob-C cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-python python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell parse-time iso8601 ls-lisp ob-R ebdb-mua ebdb-com ebdb-format ebdb mailabbrev eieio-opt speedbar ezimage dframe eieio-base pcase timezone direnv diff-mode dash po-mode sesman vc vc-dispatcher edmacro kmacro clojure-mode lisp-mnt align imenu rust-utils thingatpt rust-mode rx rust-rustfmt rust-playpen rust-compile compile text-property-search rust-cargo org-mime ox-org ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox org-element avl-tree generator org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete comint ansi-color ring org-list org-faces org-entities time-date org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat advice org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs noutline outline delight hideshow tex crm texmathp cl-extra help-mode finder-inf use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core server avoid paren cus-load tex-site info early-init package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util 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 tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer 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 cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 657665 32701) (symbols 48 41648 1) (strings 32 179715 12671) (string-bytes 1 5599709) (vectors 16 74780) (vector-slots 8 915326 45460) (floats 8 335 61) (intervals 56 741 0) (buffers 992 41)) -- Regards, Pankaj Jangid GnuPG Fingerprint: 0B62 7424 3B26 A911 052A DDE6 7C95 6E6F F858 7689 From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 12:12:57 2021 Received: (at 48162) by debbugs.gnu.org; 2 May 2021 16:12:57 +0000 Received: from localhost ([127.0.0.1]:43522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldEiH-0004V0-Ex for submit@debbugs.gnu.org; Sun, 02 May 2021 12:12:57 -0400 Received: from mout.gmx.net ([212.227.17.20]:56727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldEiF-0004Uu-Qv for 48162@debbugs.gnu.org; Sun, 02 May 2021 12:12:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619971968; bh=uG1WLogCQIobQqLAAEbiFd5mRhnjj1n8X36EUxNijEk=; h=X-UI-Sender-Class:Subject:To:References:Cc:From:Date:In-Reply-To; b=F4l906cjfVC33NLXUuR2IVC0mI5H59BD+rK55V99GLR2sWngZdtWO75J2imo15akX ps8VVC4bCB+SO02UTtdVm8jcW1v68owYhVPY0P7n9gp21BNPNjISaYhsCNuAL+SZC7 5vnnmQR23X73Bayw654pvXyeKS/hdlzvZ1dwWxoE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([212.95.5.190]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mlw3X-1lCSOi2VoR-00izIK; Sun, 02 May 2021 18:12:47 +0200 Subject: Re: bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line To: 48162@debbugs.gnu.org References: From: martin rudalics Message-ID: <0a6dc056-4950-0c3b-0d0a-733cc0ecddab@gmx.at> Date: Sun, 2 May 2021 18:12:45 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:CZdEUrjiRf1e9nUGuvmaQypgbgAFSEZ2YDojer1RocBmU6ixS06 LlL+qPoJmUpSHr3K3Cp3ijiGreuyRzf6p5SoP48qllGbVzBFvPe68yJizqCgfr7JgDv1uq5 lf3Rl5X4iUo+Fr6kqOcrwWTzityBPin1oK4LabzuE7FLHBDQV/w+W8oCBmFb7GbPW7GT32g HyOAN66Kc36PyXMX8gxaQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:8ohIIP2YDCQ=:pSj2/qbTT9KtEAZ6LzuR8Z hFXbSSXKpLfKys5QU0CGR35nPZQw5TViGDOYsgimwHFsqNhDpFQ+d0qdfD4GpjkvVdhotgch5 enxjvoNbcPfpNXKXxux74sVDo0kH9dq4ms7l7V6Qd5dgaJ57VfUF2YJm3N/WOAj10P6ap+rdy q+DCUJtdvUoGv2ITS6+VITm+Fi41SxWqnD5UnGg0ULyfmLrYiwvlxLfLWskxHtaAQICcq3YX4 YHSn+hEtpOQol7kScyPSe/a8HBXpVYciZakc4ac03+fh2mEx2P2jJ/IXZ6nCdWOLPw5IP/tv2 S/joshIfnRAxTzpbARTRNIjd4yFxX+P8rJV4OxGX2SPYOuK/KLUrI2sxodHZFHKWelc0SOmSt QtjPRqoR5TEyKzhWSuPwRI5rL8IiXP68gYtrKRG+G882VJhjTesPLo6kI8PjjlZA6fq/Bfr9N 83/V5oeGU+vS65JwoU30hBKwO15oxkTnoMapM6qhPgY8RJWu/Fau6ht1gxWHJalr3F3oKX2t5 yc8KBL5fsyEObqK8rahIk4Ou8fG6BMISOm2JIwV/hQ6xpq2gTeX9dVqIEO2gxHg84UjWJa/UA U4qDb6FfImbT+/hFyMzWOHV6K8WckSF+Fu91HMxEwoQazo1crrGz9x6KsHCDKjSRkBg1bN4n9 S4i4Wmf8i2s6Ku/mC9+Jz9WQNjUsnni0ClFmY4xUmYxd/NscP/Sn3RfWd8ml7egNhaQkTEceh VNN9t4K/A6eqiFaFMJAaVea6EMfs7r6Us+UGV33XvTKurOVW93X6ye0i6+0wt4ns2RV/I4RAp izZEWXrHPkBWc3Nb5LqzSYGQ4WQIklxSpqDKp2A3e2sNu6PKYxV6R0U3YrHQ5ON3F4QlTFSS/ esc94XgEcVmTsR1vorGYX8hAB6anB9Btwjejnd64nWWEAal/f7qFw93J+mUXSJ5M2s86vxh+6 hViTfyknKcOgKlET6ecnT1Qq6QLaMR1sn7YJKdtXi2AnMe85qcepXVlmj4fOe+rvJovvrdm4L XGugyJ0XfDsS23+ulkQtfjQs8GQa+yq4n2RAxEaNKhRXaNx31vFDug07Q9wwQGgr/tAek9neE 1z3wMXY2gLfwXO4YKpAeD1ZjVk6U8+67eRHAzZliGaUPG3+e61G9AZm2uQKryI+dQEAEif+Lc ZjVTm2i5ejPpyObmwJ4+IPX7NCHpOVNWD683V779joP3kNbtyK0yIxdzMtDuSk+SBcUxk= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48162 Cc: pankaj@codeisgreat.org 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 (-) > This is occurring on MacOS build. Branch: master. > Steps: > 1. ./src/emacs -Q > 2. M-x set-frame-width RET 160 RET > > Result: Frame size is increased but mode-line still has original width. Could you please try the patch below. Thanks, martin diff --git a/src/nsterm.m b/src/nsterm.m index 6e7ab1266b..b089146e64 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7310,9 +7310,9 @@ - (void)viewDidResize:(NSNotification *)notification /* Don't want to do anything when the view size hasn't changed. */ if ((oldh == newh && oldw == neww) - || (emacsframe->new_size_p - && newh == emacsframe->new_height - && neww == emacsframe->new_width)) + && (!emacsframe->new_size_p + || (newh == emacsframe->new_height + && neww == emacsframe->new_width))) { NSTRACE_MSG ("No change"); return; From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 12:45:39 2021 Received: (at 48162) by debbugs.gnu.org; 2 May 2021 16:45:39 +0000 Received: from localhost ([127.0.0.1]:43658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldFDu-0004om-PG for submit@debbugs.gnu.org; Sun, 02 May 2021 12:45:39 -0400 Received: from outbound.soverin.net ([116.202.65.218]:37569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldFDr-0004og-Oq for 48162@debbugs.gnu.org; Sun, 02 May 2021 12:45:37 -0400 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 6032760109; Sun, 2 May 2021 16:45:29 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1619973928; bh=Pf6cCsRhhkAPfoC46khpB9VYxDqmmt4gPl3gSms+hJ0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nu4g8mJUfOiECtBkanQh/lLdxOpt8C82p/qynD3omK+rssc4CI9V73gFelBaIlpws 5O9jkdIKel6KNsWvSIx8mvg/dXnmeSuduREumk/KI1R99L3se0i3Mgqt62pyTfyW7r g3oE5bfxHRJR1f4gzPZuOD/F+KxY0KGl/d+mlQ06Vm1sE314OcLgvfygyX6fepChib QnHFhDI+BHLu6ei93GzvD0nTAzPXClWMyFWXLyVEK7nsNAN4H8jie9pJn6dX+4yqkz gcOxAbvBKRfhtpp/kj9nMhFtnH6lKqsQD25YD0cRZ8+b3AOA4D3E9Je+T3H/D3FC2e JGD8ZNxUgo0EQ== Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94) (envelope-from ) id 1ldFDh-0004nN-Eu; Sun, 02 May 2021 17:45:25 +0100 Date: Sun, 2 May 2021 17:45:25 +0100 From: Alan Third To: martin rudalics Subject: Re: bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line Message-ID: Mail-Followup-To: Alan Third , martin rudalics , 48162@debbugs.gnu.org, pankaj@codeisgreat.org References: <0a6dc056-4950-0c3b-0d0a-733cc0ecddab@gmx.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0a6dc056-4950-0c3b-0d0a-733cc0ecddab@gmx.at> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48162 Cc: pankaj@codeisgreat.org, 48162@debbugs.gnu.org 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 (-) On Sun, May 02, 2021 at 06:12:45PM +0200, martin rudalics wrote: > > This is occurring on MacOS build. Branch: master. > > Steps: > > 1. ./src/emacs -Q > > 2. M-x set-frame-width RET 160 RET > > > > Result: Frame size is increased but mode-line still has original width. > > Could you please try the patch below. > > Thanks, martin > > > diff --git a/src/nsterm.m b/src/nsterm.m > index 6e7ab1266b..b089146e64 100644 > --- a/src/nsterm.m > +++ b/src/nsterm.m > @@ -7310,9 +7310,9 @@ - (void)viewDidResize:(NSNotification *)notification > > /* Don't want to do anything when the view size hasn't changed. */ > if ((oldh == newh && oldw == neww) > - || (emacsframe->new_size_p > - && newh == emacsframe->new_height > - && neww == emacsframe->new_width)) > + && (!emacsframe->new_size_p > + || (newh == emacsframe->new_height > + && neww == emacsframe->new_width))) > { > NSTRACE_MSG ("No change"); > return; This patch reintroduces the infinite loop I was trying to avoid. viewDidResize is called every time the view's "frame" is touched. Most of the time this happens when nothing has changed, but calling change_frame_size, even when nothing has changed, appears to cause the toolbar to redraw, which causes viewDidResize to be called again, and so on ad infinitum. So I put in the check whether the new frame size that's reported is actually the same as the previous frame size, and if so do nothing. Then realised that I need to check the new_height and new_width settings in case the change is already pending. I'm not sure where new_size_p comes into it, perhaps we don't even need to check it in viewDidResize, because all we care about is the final outcome? Maybe this really isn't the way to do it and I need to keep track of the frame size separately, which is something I was hoping to avoid. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 12:57:27 2021 Received: (at 48162) by debbugs.gnu.org; 2 May 2021 16:57:27 +0000 Received: from localhost ([127.0.0.1]:43705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldFPK-0004vy-U1 for submit@debbugs.gnu.org; Sun, 02 May 2021 12:57:27 -0400 Received: from mout.gmx.net ([212.227.15.18]:56871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldFPI-0004vh-R4 for 48162@debbugs.gnu.org; Sun, 02 May 2021 12:57:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619974631; bh=8JfAnDsXellNTWErbYMJ5WIUjnRMF6T9P/eQ+mlzU8c=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=fhQeKnQML1WYr42fObSMzAyveIozOC2RlGmQxJ4w4M143YVGPONEfW6t9qamBhUtu VStZIWSNi0wOVICrXMPFfQUcM6H9F5erJKtdPUUtYk/Cq6BCsZqgF9NXk5zhR7+k9Y tYlIPHPpNXbhNTlyORl84vdYFNVNRGTorTHyUHuw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([212.95.5.190]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MQe5k-1lxW530Zz4-00Nj3P; Sun, 02 May 2021 18:57:11 +0200 Subject: Re: bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line To: Alan Third , 48162@debbugs.gnu.org, pankaj@codeisgreat.org References: <0a6dc056-4950-0c3b-0d0a-733cc0ecddab@gmx.at> From: martin rudalics Message-ID: <28c3ab57-5735-58fb-8008-dbb1b57c88f6@gmx.at> Date: Sun, 2 May 2021 18:57:08 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:kzn+E8ljWxyc7u3ixkvWN/D4jz54Ut+kc/IsP3aihjqNKUlbkyx wXNhlzzKQxjqRs3ONGRTt1WWQ2x9ERGrreaxwCtT6dNUY1ewUR5NoKOON/gGN+8xl4OYQBj oes/AMJIYwIlBPyjV58OxF8KMy4CCxsbM8HR/2VvjRaQ+KyoZITpSLaN/lQ/oyjJv4eqxBg iDnqQXoGJfk0uGThJEPKw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:umyeFWrQUV0=:CBkrASOzjFrMnd1mRLykli Q1AfMocM01ZVLw9jzWyM3AT4JysY9H016qsPEcxRp94UwWJqE1+xfIm757ONgvm163Mh+iHdV wr/KDVJsBiGmhtcJUVcWHthNzJZ4/iCI+YrMifNlDdbDtQhsAiXl8krMiTmFW4pXQSzgZUffv gBHa8RVU6DOXE0Xx8k+0YnpcugL4Odeml8+XwbgvEaj0bKUHTonecQ3LXVVjhayWYu7PinXSa Og0DAhbVhJtwIzkLETFg9d+Rd0k8gjthsjiaEnB+DxC8Qlwzf+fZaH7lLE8N8YENcLMkTYQhM Ww/t2nvgO4G65zeSKiJp13PBSbfNRXWLXlpJPCz9etxUJUm3GInRrr5CrbJzY1PvDRpHscNI1 nkMg9Nae8j9Lo/qJy+rDNPVKHy+hjqMjN1l4tNiVF5OV+T5t887H9cx/mMjqoZR1dlXRKnPgi z7q0MsvXNhLaUOafUmoyIRkb1wWZ1ZSpmgYD9Eaaxcs6RqaHW4hRdxVR7e0h3OsmutuZ3kRS3 +/oAUGvwiQymOOsr9d4PHskrbwMdCe5W9YOa7vFo6dsP66/acRnPHCNosdGVb2jsOEWz/IwH1 YBAV1fgPyBdfhrEtd5gK9BtQDBWMOWR01vKbnxkKjek6Gtxluh2b4axcyVZUU+qHa0TKjygZ1 CXU3iARNYCJepUOl2apKWyxEzWF1URA1Z62cP0xMR+/zBhMy3RBOuXpNURkxQu3yan3prceTm y4NIas4mVtJVDVhICkQtptR9iqQDqhbRiFnPLjxn3IfzYuZEX5jS5lWqy3AZVPq5uRF8QRzvX GcZT1aPzqWphyJsAIFsa8/7NPTdFzgPeFWNFrBFYHIfAE9I395E43DYBYANAWvOv4Ia5m8zta SiQ0dG8lGISXwyTsdMFiCBtI1mplC3/i+e0H0KxU1zthwlJm7VE8iG4g3cbGjQK2aiDK42AQG huwOM2BJKlp8ggFuY6+J6QLvr6MOma0YaNnuadxtDh5gncaHCFmdvOSAN/tyHfxUdpJGXdq91 5adPOQvCY0g1SOolX0LHsSrafnBMc7KOwITGg1gVnuMoiZhzb+EAO/c17XhaUY+eyuCPih8XR aoROCudS+umN2/iurciLd3rSgDZT90Qc9bNw02GxzGkHCpLxJ/4jSqR10sHMZ1izzEmLbh/Ua l3l/n0v9nt3TLzaWxnkTZxbWCL3ozERi4y/uqU2brGfV8K6bbXVD/Rxwob9iY+LYCsbaQ= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48162 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 (-) > This patch reintroduces the infinite loop I was trying to avoid. > > viewDidResize is called every time the view's "frame" is touched. Most > of the time this happens when nothing has changed, but calling > change_frame_size, even when nothing has changed, appears to cause the > toolbar to redraw, which causes viewDidResize to be called again, and > so on ad infinitum. > > So I put in the check whether the new frame size that's reported is > actually the same as the previous frame size, and if so do nothing. > Then realised that I need to check the new_height and new_width > settings in case the change is already pending. > > I'm not sure where new_size_p comes into it, perhaps we don't even > need to check it in viewDidResize, because all we care about is the > final outcome? > > Maybe this really isn't the way to do it and I need to keep track of > the frame size separately, which is something I was hoping to avoid. new_size_p true means that Emacs has already received a resize event for this frame but was not yet able to process it. So the additional || (newh == emacsframe->new_height && neww == emacsframe->new_width))) in that case should "do nothing" when "nothing has changed". Where does my reasoning go wrong? martin From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 13:18:20 2021 Received: (at 48162) by debbugs.gnu.org; 2 May 2021 17:18:20 +0000 Received: from localhost ([127.0.0.1]:43806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldFjX-0007JF-OW for submit@debbugs.gnu.org; Sun, 02 May 2021 13:18:20 -0400 Received: from outbound.soverin.net ([116.202.65.218]:54209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldFjT-0007J9-Oi for 48162@debbugs.gnu.org; Sun, 02 May 2021 13:18:18 -0400 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 731AD60109; Sun, 2 May 2021 17:18:09 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1619975888; bh=jp+BB96HRY4lvhgTlnvZYC4lDsw879cBRM6+DHFkRE8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MDLhcQ4+AJ64M1cG1M+sBNVbbCFnPWQJEffV/Hg1SYuGJml8VJg3Ie5GRUu6AKxCM vmZCPcpH1Z11TUL119Czl7/3FEHu+C0k5Tn2QqCbGjxhlfcTznMCbLRrI3hqxg/HTE wohicIF4RbxO4KxE05efCnQV0RvqmCIZ0tcrSTz+qmUDln8EZA8r2gJ1zBzbiYSAtt mF/Mhw89TgYwihLtOy6JNSn8D3EUXmOnFt794d7AFOiZsoOVh0/0UXy3QZgI3AQnF1 Hsn6GReWoMQeMKBQy6LY1vcnDGJx1MRdl972Uxiw/kGDeAsuotd1UW06CzSiTzcfrB REq1fmlK4OhNA== Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94) (envelope-from ) id 1ldFjJ-0004uN-M2; Sun, 02 May 2021 18:18:05 +0100 Date: Sun, 2 May 2021 18:18:05 +0100 From: Alan Third To: martin rudalics Subject: Re: bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line Message-ID: Mail-Followup-To: Alan Third , martin rudalics , 48162@debbugs.gnu.org, pankaj@codeisgreat.org References: <0a6dc056-4950-0c3b-0d0a-733cc0ecddab@gmx.at> <28c3ab57-5735-58fb-8008-dbb1b57c88f6@gmx.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28c3ab57-5735-58fb-8008-dbb1b57c88f6@gmx.at> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48162 Cc: pankaj@codeisgreat.org, 48162@debbugs.gnu.org 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 (-) On Sun, May 02, 2021 at 06:57:08PM +0200, martin rudalics wrote: > > This patch reintroduces the infinite loop I was trying to avoid. > > > > viewDidResize is called every time the view's "frame" is touched. Most > > of the time this happens when nothing has changed, but calling > > change_frame_size, even when nothing has changed, appears to cause the > > toolbar to redraw, which causes viewDidResize to be called again, and > > so on ad infinitum. > > > > So I put in the check whether the new frame size that's reported is > > actually the same as the previous frame size, and if so do nothing. > > Then realised that I need to check the new_height and new_width > > settings in case the change is already pending. > > > > I'm not sure where new_size_p comes into it, perhaps we don't even > > need to check it in viewDidResize, because all we care about is the > > final outcome? > > > > Maybe this really isn't the way to do it and I need to keep track of > > the frame size separately, which is something I was hoping to avoid. > > new_size_p true means that Emacs has already received a resize event for > this frame but was not yet able to process it. So the additional > > || (newh == emacsframe->new_height > && neww == emacsframe->new_width))) > > in that case should "do nothing" when "nothing has changed". Where does > my reasoning go wrong? I'm not sure. I was hoping you were going to tell me where I'm going wrong! :) The only thing I can see is that in order to go into the block and return when new_size_p is false requires newh == oldh == new_height. And the same with width. Should it be this? if ((oldh == newh && oldw == neww && !emacsframe->new_size_p) || (newh == emacsframe->new_height && neww == emacsframe->new_width)) But I'm still not sure. If we have a change pending and the WM sends another change through, should we call change_frame_size with the new sizes? Perhaps it just needs to look like this? if ((oldh == newh && oldw == neww) || (newh == emacsframe->new_height && neww == emacsframe->new_width)) This is hard, because I can't replicate either of the reported bugs and I suspect my reasoning is very off here. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 15:19:55 2021 Received: (at 48162) by debbugs.gnu.org; 2 May 2021 19:19:55 +0000 Received: from localhost ([127.0.0.1]:44284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldHdD-0008Jm-IY for submit@debbugs.gnu.org; Sun, 02 May 2021 15:19:55 -0400 Received: from mout.gmx.net ([212.227.17.21]:55195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldHd7-0008Jg-Qh for 48162@debbugs.gnu.org; Sun, 02 May 2021 15:19:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619983168; bh=N0IGrZWh8ILa9rIt+gNb4ZToHZzE0Hi0r9J/c5ShCRQ=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=PFExegO6jttkLM8JZ2NwKFvYOMcIlPeZQ+kcjvPvglOCDJsfvgWKiu2Ao7osOYFCm oDh1dIrDttP+Ig7S/Y+sN5lW8IJNqW+XAsPVhbSoIIIrzxsP59PkJrkCn3iQnhzeSK rqjIJTfD39Ly3j+Sd7beeLp4cPk5VY2ASGV6Z/sU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([46.125.249.112]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MWRRT-1m5TT90lqd-00XuEo; Sun, 02 May 2021 21:19:28 +0200 Subject: Re: bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line To: Alan Third , 48162@debbugs.gnu.org, pankaj@codeisgreat.org References: <0a6dc056-4950-0c3b-0d0a-733cc0ecddab@gmx.at> <28c3ab57-5735-58fb-8008-dbb1b57c88f6@gmx.at> From: martin rudalics Message-ID: Date: Sun, 2 May 2021 21:19:20 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:vOh92J59zL9txHyoeCu6tG8kYEeL2mrPNo2y2ho8hdqy4o04/Pv XxlmUhqB6BjcdpOZSi1vM8pSiQ1ORNsXud2iaDumVE+I9mTg9VLR0Asr0ekLjdY/iosqwDj 9ymrLam5VY+yfFeqblEGO5NvbdFcbafE1K2YwlKl9HqY2nJv99K9OuUGrXVHs58voxUGMCB 1zrFDkOblw2HH1lb6x1Sw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ok/ZgIUYH7o=:moMahRboKTCln1pnk1HRqY F9ydQsUdjxIa5X5wXHpzo/YpH7+aMthJp7lCywnHTlLQAdeergtvpsdZPpbvJ/C6nvXc7UyWB Qpt95Kpsx2G+HJB9syfOo4f7n2KTKrRqaB4/V1jMbon+byqqhybbd5OufXy103nvi0OaGa8o6 EYCShKanIn8CcbW8yH9Jf13k0mrKOlrJc7Gb3nIbzFIS+rn4TjtFD+uA6BUdQnKO74e6BDV+4 5r4xHxHkL8GqP8i4K0us4ZjzCgG2PMLYJUx33j6IXeX16q0Mzs2zlsEG6aWEgSfPUZuNE8b6J vair0qJsL7HnpYdFtzV4eQXS2ZjT0L9+AcCOwh79jWqcyU9pD5diNdIHQlhps4TjISlelN9GX mtGfrl9VOVFS/wu8aXwpRYa7rwNYQOvbZDVYbADvhxSAIe55jUVyp3Z0v/jk2tusNIpKgS40H eIZrS8yZCnCximHleQAzYcxuY60JMhedCAy3nnnKyaM+IgfDzHblU2hQq8rtOSZoyQ7dnBpTR Ds0XCafk4CtECpEPW7qAtvv1IL4rwnk4a1vtD0Da7w+Ro2HWySAXS7lPb4R/igYkLYeun9MI1 okc6Xh7TcvG+1eGR8TerNdF8i4kg1cUJ9GqDn010xX3YB65oyRjEymUv1X/tl/gDMvhsMGooU t1LKy8uD3Dpwou+LtkNjnErdh10z0gEqijisve8qcAdYdQSU+EqMXjerxIfdZ/8uW/R8SxKEI dr/waMkbv2roWFc92N68gJSQ2lr2OPVexDRrOVn9Omt1LOnXpL2a/mZKgo6TMKf4vcnqacykC yb3CfDvcl1dJrZ2VIEGdTGiLz5g81W1u1SgosjIltwPyJylMvUOZaAEFPpzmtH7gwfJqQg8Sk qJa4oCWUUP3szMlM+SO4FJB8toLre7aYh7RnrVjmVaHlN8ZEQ8SpEzSaMH8YSR7GWCbT6VXqf 50rfoUYRVpyBhyjQrmbc+KMgl1hzSbzV0DhSFD7h2hwA2pd1ZBX0i/XJlVkco8xdFGLbXZBTo NLCTP4r272MdqaJfpNQDFLAQo5PbOJXeyJaZWRI9Ts5/FFGHtJP1OlXdQBnu223L60HpH8wyr bJQvwYAELynqdKncDd2OuB/Cg/ew0LL+Js594qHEGx8AcZl+pZEuxDyD/rJk7/vxXdEECxvmV QrmZop/M46ZHNE/OKaRnzgTSKFsw/InkMe33lflBP8pSefSw/egvAG7Hiblm++kFwB2Xo= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48162 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 (-) > I'm not sure. I was hoping you were going to tell me where I'm going > wrong! :) > > The only thing I can see is that in order to go into the block and > return when new_size_p is false requires newh == oldh == new_height. > And the same with width. > > Should it be this? > > if ((oldh == newh && oldw == neww && !emacsframe->new_size_p) > || (newh == emacsframe->new_height > && neww == emacsframe->new_width)) > > But I'm still not sure. If we have a change pending and the WM sends > another change through, should we call change_frame_size with the new > sizes? We should. > Perhaps it just needs to look like this? > > if ((oldh == newh && oldw == neww) > || (newh == emacsframe->new_height > && neww == emacsframe->new_width)) > > This is hard, because I can't replicate either of the reported bugs > and I suspect my reasoning is very off here. I think I understand now: When Emacs is busy it cannot set oldh and oldw immediately so oldh == newh && oldw == neww will continue to fail and we cannot return. How about something like the below? martin --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7309,10 +7309,10 @@ - (void)viewDidResize:(NSNotification *)notification oldh = FRAME_PIXEL_HEIGHT (emacsframe); /* Don't want to do anything when the view size hasn't changed. */ - if ((oldh == newh && oldw == neww) - || (emacsframe->new_size_p - && newh == emacsframe->new_height - && neww == emacsframe->new_width)) + if (emacsframe->new_size_p + ? (newh == emacsframe->new_height + && neww == emacsframe->new_width) + : (oldh == newh && oldw == neww)) { NSTRACE_MSG ("No change"); return; From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 17:49:54 2021 Received: (at 48162) by debbugs.gnu.org; 2 May 2021 21:49:54 +0000 Received: from localhost ([127.0.0.1]:44944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldJyM-0003Nn-Ej for submit@debbugs.gnu.org; Sun, 02 May 2021 17:49:54 -0400 Received: from outbound.soverin.net ([116.202.65.218]:56391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldJyK-0003Ng-Ux for 48162@debbugs.gnu.org; Sun, 02 May 2021 17:49:53 -0400 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 9816760109; Sun, 2 May 2021 21:49:46 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1619992185; bh=cRfuSMVXFxxl4/GGQbUyG/kaUidx5yuoPc+aNPL4jYY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=U1qflXA/n2Q9ewV9jgjgUy4PqPb6n6Rj4rfQwQ1nJBdF4mqzDl5mOH6pA82M7G4E7 obeQFdAa4sI+nbNK5V+ZDRVehHg2mYjik5RjG/v7ZbhYAXtAdKl+f5g8ggwpLtb77k j862zZFiUL/THUKvIgpB/ghKOgY5qUZXQfox4VwlFuKqttTJdV50EquFh5hx4oPKg4 YvRRJneZI3QtKkHgtQRT5Lh1udRV5Le6p36vkHsshGAoWxwv7WldZqdyEpOFNsjCSR WS/tbDNGiIuyMstGbmahjkFElk6H8IHtFNCk0OXtf/CK3clcFeVeUQN7MPkZWwutHp kAdFdahgdqLTA== Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94) (envelope-from ) id 1ldJy8-0005Bx-O0; Sun, 02 May 2021 22:49:40 +0100 Date: Sun, 2 May 2021 22:49:40 +0100 From: Alan Third To: martin rudalics Subject: Re: bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line Message-ID: Mail-Followup-To: Alan Third , martin rudalics , 48162@debbugs.gnu.org, pankaj@codeisgreat.org References: <0a6dc056-4950-0c3b-0d0a-733cc0ecddab@gmx.at> <28c3ab57-5735-58fb-8008-dbb1b57c88f6@gmx.at> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="fmLIXedQg4WM4ty2" Content-Disposition: inline In-Reply-To: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48162 Cc: pankaj@codeisgreat.org, 48162@debbugs.gnu.org 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 (-) --fmLIXedQg4WM4ty2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, May 02, 2021 at 09:19:20PM +0200, martin rudalics wrote: > > Perhaps it just needs to look like this? > > > > if ((oldh == newh && oldw == neww) > > || (newh == emacsframe->new_height > > && neww == emacsframe->new_width)) > > > > This is hard, because I can't replicate either of the reported bugs > > and I suspect my reasoning is very off here. > > I think I understand now: When Emacs is busy it cannot set oldh and oldw > immediately so oldh == newh && oldw == neww will continue to fail and we > cannot return. How about something like the below? I think the attached works. I finally managed to reproduce the bug and realised that the offscreen buffer's size doesn't really have anything to do with what Emacs thinks the frame size is, so I've separated its resizing code out. Your suggested code for dealing with the Emacs frame size appears to work right without any crashes on GNUstep too, so I've included it. Now I just need to work out why using the menus causes GNUstep builds to crash and we might have a semi-usable port again. ;) -- Alan Third --fmLIXedQg4WM4ty2 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Fix-incorrect-resizing-behaviour-on-macOS-bug-48157-.patch" >From c4048b3cd6841a7f2ccdfb3f6c880c9ee176390a Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 2 May 2021 22:38:13 +0100 Subject: [PATCH] Fix incorrect resizing behaviour on macOS (bug#48157, bug#48162) * src/nsterm.m ([EmacsView viewDidResize:]): The drawing buffer can be resized independently of Emacs's idea of the frame size. Co-authored-by: martin rudalics --- src/nsterm.m | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 6e7ab1266b..bb20886ab1 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7303,16 +7303,34 @@ - (void)viewDidResize:(NSNotification *)notification NSTRACE ("[EmacsView viewDidResize]"); +#ifdef NS_DRAW_TO_BUFFER + /* If the buffer size doesn't match the view's backing size, destroy + the buffer and let it be recreated at the correct size later. */ + if ([self wantsUpdateLayer] && surface) + { + NSRect surfaceRect = {{0, 0}, [surface getSize]}; + NSRect frameRect = [[self window] convertRectToBacking:frame]; + + if (!NSEqualRects (frameRect, surfaceRect)) + { + [surface release]; + surface = nil; + + [self setNeedsDisplay:YES]; + } + } +#endif + neww = (int)NSWidth (frame); newh = (int)NSHeight (frame); oldw = FRAME_PIXEL_WIDTH (emacsframe); oldh = FRAME_PIXEL_HEIGHT (emacsframe); /* Don't want to do anything when the view size hasn't changed. */ - if ((oldh == newh && oldw == neww) - || (emacsframe->new_size_p - && newh == emacsframe->new_height - && neww == emacsframe->new_width)) + if (emacsframe->new_size_p + ? (newh == emacsframe->new_height + && neww == emacsframe->new_width) + : (oldh == newh && oldw == neww)) { NSTRACE_MSG ("No change"); return; @@ -7321,16 +7339,6 @@ - (void)viewDidResize:(NSNotification *)notification NSTRACE_SIZE ("New size", NSMakeSize (neww, newh)); NSTRACE_SIZE ("Original size", NSMakeSize (oldw, oldh)); -#ifdef NS_DRAW_TO_BUFFER - if ([self wantsUpdateLayer]) - { - [surface release]; - surface = nil; - - [self setNeedsDisplay:YES]; - } -#endif - change_frame_size (emacsframe, neww, newh, false, YES, false); SET_FRAME_GARBAGED (emacsframe); -- 2.30.2 --fmLIXedQg4WM4ty2-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 23:40:33 2021 Received: (at submit) by debbugs.gnu.org; 3 May 2021 03:40:33 +0000 Received: from localhost ([127.0.0.1]:45977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldPRh-0006ea-Ah for submit@debbugs.gnu.org; Sun, 02 May 2021 23:40:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:53872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldPRe-0006eU-RL for submit@debbugs.gnu.org; Sun, 02 May 2021 23:40:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldPRe-0005UU-KM for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 23:40:30 -0400 Received: from ciao.gmane.io ([116.202.254.214]:35420) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldPRd-0008Ca-7p for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 23:40:30 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1ldPRb-0008hx-5H for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 05:40:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Pankaj Jangid Subject: Re: bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line Date: Mon, 03 May 2021 09:10:22 +0530 Message-ID: References: <0a6dc056-4950-0c3b-0d0a-733cc0ecddab@gmx.at> <28c3ab57-5735-58fb-8008-dbb1b57c88f6@gmx.at> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cancel-Lock: sha1:PSym0jBA9u0flTCDowDUHvsxeT0= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: submit 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.2 (--) Alan Third writes: > I think the attached works. I finally managed to reproduce the bug and > realised that the offscreen buffer's size doesn't really have anything > to do with what Emacs thinks the frame size is, so I've separated its > resizing code out. This patch worked for me. From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 03:49:58 2021 Received: (at 48162) by debbugs.gnu.org; 3 May 2021 07:49:58 +0000 Received: from localhost ([127.0.0.1]:46100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldTL4-0002j7-10 for submit@debbugs.gnu.org; Mon, 03 May 2021 03:49:58 -0400 Received: from mout.gmx.net ([212.227.17.21]:43311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldTL2-0002j1-EY for 48162@debbugs.gnu.org; Mon, 03 May 2021 03:49:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620028183; bh=uCDngRtoIJKEAWzNqF6ed+jEZ4xkFiYpbF9TZbce7Yw=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=bI8XhuMi/qUCzFz79VQUwgjIBNLfj6881quvg1D1IhDP+h+ew24z9OvxE+W8dKR3J P0CTSDunJ4lN8gbRjMrgGahApAOF3dnXDSNjpITWG9y3dWMQLv9Q+r1HG0rWat4kVZ JLwQQqWgorjFbRpy4c8IYBzQdIB5tmMcVTEyJ6Kg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([212.95.5.3]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MEm27-1lncLt3rER-00GE8o; Mon, 03 May 2021 09:49:43 +0200 Subject: Re: bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line To: Alan Third , 48162@debbugs.gnu.org, pankaj@codeisgreat.org References: <0a6dc056-4950-0c3b-0d0a-733cc0ecddab@gmx.at> <28c3ab57-5735-58fb-8008-dbb1b57c88f6@gmx.at> From: martin rudalics Message-ID: Date: Mon, 3 May 2021 09:49:41 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:mtw0AEr/leddQ3bu4fbtyvlAOY/5Xn+z8iOvC4O9r99cxN3CasV eImQjPA2o0cc5hoAZtl0bjIL2CPowiePNeHerGoBcS2ywWVg6ggwICNoZv3jmaxrL0JPpx0 +7wMlV+EoEOfN/oFCUTDyM4/chjVdgrcJQDIO0z7JWusQZndnK7IvUzpmWzvRBA33EmF5X3 gJL6WPT24+FDskBBoa4WA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ldPsQWEZI3g=:/KhPpvXVLvWFjIeosYIr37 4Eyu1C6krXButMD5gJLmXidptxEPo448xZLIvEAk5lGOIcAGG6X5wAEGmcJsYhEnh9of1ShwB xmt5O35kphaYb58YwrZegMqBbpCuZgRCy/Db8WqgVhbXMt+4GR5AhCw7zKerrXEeEEbrdqfF+ R6KEr2+tAxa+KbyN34dAUFvnZSMwolyxjZJs2biAPUzLseRkTsSLYvPyYR6XRKpbkiECpjzcI SBc98rjfmwPLVR31IfOqle7eeD9X1qQ5tawBUcxj9/phYZqiDgXiaw8Eu7VdR2Dxu2g/8XYIP XH1f3+h5xBaudDByvkLhK82Udd0585c64QrjpReZXr3eZj9rrMAZh3tIBWn8QZm4C9HfPeBdY DaTajkbbLa4Ikvq0rap1rquqir0qRitg2TY6tR0/36c66LyV+uSEHSBV9UulQnQozHIpbpulm agkE4eq9v+2HtAUfoqSSb8GN+2I1w8VilCVo4of2coEfGCAQQ0yKvEH3UQh5mmTL//pVJroVi dB96K+rDlCrjBAZLNck9pWOq545NQyYWflnMiFCT2/iP03WjUG7kq3oK3OcMK1aeKo/cKzIhk 6RWfa4PjCj7x5a2JyUW8eLrL/UJWGyx9FvBeh7vNQifzQ++rp+iBvweCXs+dqCwGdWdsMG5YI eStLejFyJEX0rH/i8B7Z8cK0kPxKfJsQ+cEgOYB8cdRcRbFey/vYla0OTAl6uFcmWCTzic1tO qAr42oZ18ZnoS7qwhbcJo80IAaVPhy5B6HOfc1CxrcYlstAYTj7wPVXgbpK5lfRNS99f5xkoR Vdg5VoprqxenT43bTpoZtmd2iPRfvHhas0RV7Hx/cdOamVXloPtO+dWTTAYK5dllkaquhv9YH J59UiFXqeE17EE56q9KE2xkZ2IwPXwXGONILO1Ido01AFb2pZImHnE1k192o8u+9vsxYrocoa RuiitzZS/G8ras4KYtaeyuuW5dwQAbhnUQd+kU9/SjXLrWboW//svI3pixWtPX/y/QmBUDn7b YJ/w9e7gORKWqbsyLiwI09agaaFqJaMlKeGyvaJWPchbTRE9ETLz5D5pRf9+FY34gmrelo6Oq W0/4lLsSk2rShHnPZCYLaKh/2zEaVD+5wmFC4cTpeb5eDXM/B23razn6xpDBUAEduqi/P2nWi O/wTIkdlD+d13cg0EHN6W1vLnZHZFa7FEK/U4bBykq9Lw4SfacPivKAgFsRvrjjInQhYM= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48162 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 (-) > Now I just need to work out why using the menus causes GNUstep builds > to crash and we might have a semi-usable port again. ;) It crashes here when trying to close a submenu. Other than that GNUstep seems indeed usable. Good work. martin From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 08:50:12 2021 Received: (at 48162-done) by debbugs.gnu.org; 3 May 2021 12:50:12 +0000 Received: from localhost ([127.0.0.1]:46451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldY1c-00045b-1Z for submit@debbugs.gnu.org; Mon, 03 May 2021 08:50:12 -0400 Received: from outbound.soverin.net ([116.202.65.218]:60099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldY1a-00045P-49 for 48162-done@debbugs.gnu.org; Mon, 03 May 2021 08:50:11 -0400 Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id C5EAE60109; Mon, 3 May 2021 12:50:03 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1620046203; bh=mISSEsoKJQwPN2ZdeRwf3Q0kcG5JmJEVsrgT1trD4Rg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OehyEl1vaVywfLyHRgGVvOmBaDjFiXMrV5+o/jKHQmxzBT9ZIvRcE5gPg797dNjY+ FV+ALwlMKnrA1n3CffFh42bYQPOC2ra2LLRs1oSDYxm2Z+gJencNqhWhKgSbmjfNgi VJ/6f4IP+/3d2XPfdoQXYiRYKmyF4cKgpR/dQQZY0Pq5A45ye1AwkJG12l2o+nE96M tfMmwEXrNyH6UB7il3bMrWAIeLh2wtb6fcRRGw9/c+GKBhCat8cHiUKRiYFww69j0d l89Mq5asZhJE387r6gGBiZe7lh2fOvukPWYLeTIohxUUE7hFyu3z3Xrsokuhw5ERAM 7UXgnokN6TrOQ== Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94) (envelope-from ) id 1ldY1Q-0000fh-Bw; Mon, 03 May 2021 13:50:00 +0100 Date: Mon, 3 May 2021 13:50:00 +0100 From: Alan Third To: Pankaj Jangid Subject: Re: bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line Message-ID: Mail-Followup-To: Alan Third , Pankaj Jangid , 48162-done@debbugs.gnu.org References: <0a6dc056-4950-0c3b-0d0a-733cc0ecddab@gmx.at> <28c3ab57-5735-58fb-8008-dbb1b57c88f6@gmx.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48162-done Cc: 48162-done@debbugs.gnu.org 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 (-) On Mon, May 03, 2021 at 09:10:22AM +0530, Pankaj Jangid wrote: > Alan Third writes: > > > I think the attached works. I finally managed to reproduce the bug and > > realised that the offscreen buffer's size doesn't really have anything > > to do with what Emacs thinks the frame size is, so I've separated its > > resizing code out. > > This patch worked for me. Thanks. I think I'll just push this for now. -- Alan Third From unknown Sat Aug 16 23:46:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 01 Jun 2021 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator