From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line Date: Sun, 2 May 2021 21:19:20 +0200 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; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7881"; mail-complaints-to="usenet@ciao.gmane.io" To: Alan Third , 48162@debbugs.gnu.org, pankaj@codeisgreat.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 02 21:20:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldHdT-0001x5-Mt for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 21:20:11 +0200 Original-Received: from localhost ([::1]:51014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldHdS-0003wL-PY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 15:20:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldHdK-0003wE-ME for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 15:20:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldHdK-000631-E9 for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 15:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ldHdK-0008K6-95 for bug-gnu-emacs@gnu.org; Sun, 02 May 2021 15:20: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: Sun, 02 May 2021 19:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48162 X-GNU-PR-Package: emacs Original-Received: via spool by 48162-submit@debbugs.gnu.org id=B48162.161998319531982 (code B ref 48162); Sun, 02 May 2021 19:20:02 +0000 Original-Received: (at 48162) by debbugs.gnu.org; 2 May 2021 19:19:55 +0000 Original-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 Original-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 Original-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 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:vOh92J59zL9txHyoeCu6tG8kYEeL2mrPNo2y2ho8hdqy4o04/Pv XxlmUhqB6BjcdpOZSi1vM8pSiQ1ORNsXud2iaDumVE+I9mTg9VLR0Asr0ekLjdY/iosqwDj 9ymrLam5VY+yfFeqblEGO5NvbdFcbafE1K2YwlKl9HqY2nJv99K9OuUGrXVHs58voxUGMCB 1zrFDkOblw2HH1lb6x1Sw== 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/mZKgo6TMKf4vcnqacyk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205446 Archived-At: > 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;