From: martin rudalics <rudalics@gmx.at>
To: Alan Third <alan@idiocy.org>,
48162@debbugs.gnu.org, pankaj@codeisgreat.org
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 [thread overview]
Message-ID: <ee098a00-737d-8678-2835-fe88f0824340@gmx.at> (raw)
In-Reply-To: <YI7ezV2RYNuH2xkZ@idiocy.org>
> 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;
next prev parent reply other threads:[~2021-05-02 19:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-02 15:42 bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line Pankaj Jangid
2021-05-02 16:12 ` martin rudalics
2021-05-02 16:45 ` Alan Third
2021-05-02 16:57 ` martin rudalics
2021-05-02 17:18 ` Alan Third
2021-05-02 19:19 ` martin rudalics [this message]
2021-05-02 21:49 ` Alan Third
2021-05-03 3:40 ` Pankaj Jangid
2021-05-03 12:50 ` Alan Third
2021-05-03 7:49 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ee098a00-737d-8678-2835-fe88f0824340@gmx.at \
--to=rudalics@gmx.at \
--cc=48162@debbugs.gnu.org \
--cc=alan@idiocy.org \
--cc=pankaj@codeisgreat.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).