From: Drew Adams <drew.adams@oracle.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 16923@debbugs.gnu.org
Subject: bug#16923: 24.3.50; reression: `set-frame-size' loses mode line
Date: Sun, 9 Mar 2014 09:35:40 -0700 (PDT) [thread overview]
Message-ID: <2bd68fd8-79a5-49be-80fe-c53d4a689320@default> (raw)
In-Reply-To: <531C72F2.4080608@gmx.at>
[-- Attachment #1: Type: text/plain, Size: 6092 bytes --]
> >> This means that the frame size changes across the "------------" on line
> >> 91. And it changes again across the next two "------------"'s. Can you
> >> explain that?
>
> It's important to get a trace of _every_ call of `set-frame-size' for
> that frame - no matter where it comes from. Are you sure you did that?
I cannot be sure that something, somewhere else did not issue another call
of `set-frame-size', no. My debugging is limited to `fit-frame' calls.
> And I take it granted that for each `set-frame-size' you inserted a
> "------------" in the buffer, then three identical `window--dump-frame'
> outputs before the call to `set-frame-size' each preceded by a form feed
> and then three identical `window--dump-frame' outputs after the call to
> `set-frame-size' each preceded by a form feed too.
Correct, wrt the call to `set-frame-size' within `fit-frame'. See above.
> Then you did the same for the next `set-frame-size' call. Can you
> confirm that? If not, please elaborate.
Yes, AFAIK, IIRC. And as I've already confirmed several times now.
> >> If it's caused by the window manager, then you should
> >> notice that the heights don't fit already there (you got 51 lines
> >> instead of the 59 you requested).
> >
> > What shows a request of 59 and a result of 51? I see `51' on line 93,
> > which I guess you are saying is the resulting frame size (?). But
> > resulting from what size request? Where do you see the `59' as an
> > indication of what size was requested?
>
> On line 48:
> frame pixel: 627 x 856 cols/lines: 75 x 59 units: 8 x 14
>
> From the interpretation I gave above this line results from the first
> `window--dump-frame' call following the very first `set-frame-size' call
> you recorded. Can you see that? Is my interpretation correct?
Yes. But again, where does the dump show a _request_ of 59? What line
48 shows is the _result_ of resizing to 59. And again, IIRC that was
the right thing to do - the only place where the mode line disappeared
in this debug file is at the end. But I am repeating what I've already
repeated.
> > What I think I see instead is this:
> > 3 calls to w32* before the resize request, showing a height of 51,
> > followed by 3 more calls to w32* after the resize request, showing
> > a height of 59 (starting on line 138).
>
> Line 138 is from the first `window--dump-frame' call following the
> _second_ `set-frame-size' resize request you recorded. I'm talking
> about the _first_ `set-frame-size' request you recorded.
As I said, IIRC, there was no problem with that first `set-frame-size'
(before line 48). The mode line did not disappear at that resizing.
But it's possible that I am not remembering correctly. (So I repeated
the test - below.)
> And please make only one call of `window--dump-frame' before and one
> call after each `set-frame-size' call. And please don't insert any form
> feeds - they might easily corrupt any communication about which line of
> dumped text we are on.
>
> ... But what apparently happened is that after
> the last (of six) `window--dump-frame' calles belonging to the first
> `set-frame-size' request and before the first `window--dump-frame' call
> belonging to the second `set-frame-size' request the size of the frame
> changed as in lines 78 to 104 of throw-emacs-bug-16923.txt:
> ...
> And this change is unexplained yet. What height did you see and
> what height did you expect to see at the time you hit `s' before the
> "------------" was drawn in this excerpt - 59 or 51 lines?
Dunno.
---
I made another test. I removed the form feed from `window-dump-frame'
and I have `fit-frame' call `window-dump-frame' only once before and once
after `set-frame-size'. And I have `fit-frame' print the requested new
width and height, before calling `set-frame-size'.
I tested it using `C-x C-_', which is bound to `fit-frame'. See attached.
It shows that the height, as reported by `window--dump-frame', changed
from 69 to 62 after the dump that reported the result of the first
`set-frame-size'. Why that would be is a mystery to me.
It shows that the resulting height of the second `set-frame-size', which
caused the mode line to disappear, is correct: 69. (But the starting
height, according to `window--dump-frame', was unexpected - see above.)
The two attachments show the same test, repeated. But here is some
more info that may help:
If I just repeat calls to `fit-frame' when the frame is already the
right size then the mode line does not disappear. To manifest the
problem, I must first manually resize the frame (e.g. with the mouse)
so that `fit-frame' will actually resize it (change its size). Then,
after that first `fit-frame' resizes it correctly, a second `fit-frame'
leads to the debug output attached: the mode line is lost, and the
dump output from `fit-frame' BEFORE the `set-frame-size' shows an
incorrect height value.
IOW, it seems that what is needed is first (a) an actual change in
frame size by `set-frame-size' and then (b) a `set-frame-size' that
does not actually change the size. Both (a) and (b) seem necessary
to lose the mode line. If I start with a frame that already has the
target size (i.e., it has already been fit), then repeating `fit-frame'
has no visible effect, including no loss of the mode line.
Note too that even though the dump shows an incorrect height value,
there is nothing visual that corresponds to this: The frame height
after the frame is fit (correctly) does not visibly change when the
second `fit-frame' is called. The only visible effect of the second
`fit-frame' is that the mode line disappears.
IOW, `fit-frame', and thus `set-frame-size', seem to be doing their
job correctly. As you point out, and as these dumps show once again,
something internal in Emacs seems to think that the height is less
than it actually is (by 6 units, in this case). The new, requested
frame height is applied correctly.
HTH.
[-- Attachment #2: throw-emacs-bug-16923-bis.txt --]
[-- Type: text/plain, Size: 2484 bytes --]
------------
frame pixel: 728 x 804 cols/lines: 104 x 67 units: 7 x 12
frame text pixel: 707 x 804 cols/lines: 101 x 67
tool: 0 scroll: 21 fringe: 0 border: 0 right: 2 bottom: 2
w32-rect: (0 0 736 884), (0 0 728 804)
#<window 30 on throw-fit-frm.el> parent: nil
pixel left: 0 top: 0 size: 728 x 804 new: 0
char left: 0 top: 0 size: 104 x 67 new: 0
normal: 1.0 x 1.0 new: 0
body pixel: 707 x 790 char: 101 x 65
width left fringe: 0 left margin: 0 right margin: 0
width right fringe: 0 scroll-bar: 21 divider: 0
height header-line: 0 mode-line: 14 divider: 0
::: Requested WIDTH: 101, HEIGHT: 69
frame pixel: 728 x 828 cols/lines: 104 x 69 units: 7 x 12
frame text pixel: 707 x 828 cols/lines: 101 x 69
tool: 0 scroll: 21 fringe: 0 border: 0 right: 2 bottom: 2
w32-rect: (0 0 736 884), (0 0 728 804)
#<window 30 on throw-fit-frm.el> parent: nil
pixel left: 0 top: 0 size: 728 x 828 new: 0
char left: 0 top: 0 size: 104 x 69 new: 0
normal: 1.0 x 1.0 new: 0
body pixel: 707 x 814 char: 101 x 67
width left fringe: 0 left margin: 0 right margin: 0
width right fringe: 0 scroll-bar: 21 divider: 0
height header-line: 0 mode-line: 14 divider: 0
------------
frame pixel: 728 x 744 cols/lines: 104 x 62 units: 7 x 12
frame text pixel: 707 x 744 cols/lines: 101 x 62
tool: 0 scroll: 21 fringe: 0 border: 0 right: 2 bottom: 2
w32-rect: (0 0 736 824), (0 0 728 744)
#<window 30 on throw-fit-frm.el> parent: nil
pixel left: 0 top: 0 size: 728 x 744 new: 0
char left: 0 top: 0 size: 104 x 62 new: 0
normal: 1.0 x 1.0 new: 0
body pixel: 707 x 730 char: 101 x 60
width left fringe: 0 left margin: 0 right margin: 0
width right fringe: 0 scroll-bar: 21 divider: 0
height header-line: 0 mode-line: 14 divider: 0
::: Requested WIDTH: 101, HEIGHT: 69
frame pixel: 728 x 828 cols/lines: 104 x 69 units: 7 x 12
frame text pixel: 707 x 828 cols/lines: 101 x 69
tool: 0 scroll: 21 fringe: 0 border: 0 right: 2 bottom: 2
w32-rect: (0 0 736 884), (0 0 728 804)
#<window 30 on throw-fit-frm.el> parent: nil
pixel left: 0 top: 0 size: 728 x 828 new: 0
char left: 0 top: 0 size: 104 x 69 new: 0
normal: 1.0 x 1.0 new: 0
body pixel: 707 x 814 char: 101 x 67
width left fringe: 0 left margin: 0 right margin: 0
width right fringe: 0 scroll-bar: 21 divider: 0
height header-line: 0 mode-line: 14 divider: 0
[-- Attachment #3: throw-emacs-bug-16923-ter.txt --]
[-- Type: text/plain, Size: 2480 bytes --]
------------
frame pixel: 728 x 804 cols/lines: 104 x 67 units: 7 x 12
frame text pixel: 707 x 804 cols/lines: 101 x 67
tool: 0 scroll: 21 fringe: 0 border: 0 right: 2 bottom: 2
w32-rect: (0 0 736 884), (0 0 728 804)
#<window 30 on throw-fit-frm.el> parent: nil
pixel left: 0 top: 0 size: 728 x 804 new: 0
char left: 0 top: 0 size: 104 x 67 new: 0
normal: 1.0 x 1.0 new: 0
body pixel: 707 x 790 char: 101 x 65
width left fringe: 0 left margin: 0 right margin: 0
width right fringe: 0 scroll-bar: 21 divider: 0
height header-line: 0 mode-line: 14 divider: 0
::: Requested WIDTH: 101, HEIGHT: 69
frame pixel: 728 x 828 cols/lines: 104 x 69 units: 7 x 12
frame text pixel: 707 x 828 cols/lines: 101 x 69
tool: 0 scroll: 21 fringe: 0 border: 0 right: 2 bottom: 2
w32-rect: (0 0 736 884), (0 0 728 804)
#<window 30 on throw-fit-frm.el> parent: nil
pixel left: 0 top: 0 size: 728 x 828 new: 0
char left: 0 top: 0 size: 104 x 69 new: 0
normal: 1.0 x 1.0 new: 0
body pixel: 707 x 814 char: 101 x 67
width left fringe: 0 left margin: 0 right margin: 0
width right fringe: 0 scroll-bar: 21 divider: 0
height header-line: 0 mode-line: 14 divider: 0
------------
frame pixel: 686 x 756 cols/lines: 98 x 63 units: 7 x 12
frame text pixel: 665 x 756 cols/lines: 95 x 63
tool: 0 scroll: 21 fringe: 0 border: 0 right: 2 bottom: 2
w32-rect: (0 0 694 836), (0 0 686 756)
#<window 30 on throw-fit-frm.el> parent: nil
pixel left: 0 top: 0 size: 686 x 756 new: 0
char left: 0 top: 0 size: 98 x 63 new: 0
normal: 1.0 x 1.0 new: 0
body pixel: 665 x 742 char: 95 x 61
width left fringe: 0 left margin: 0 right margin: 0
width right fringe: 0 scroll-bar: 21 divider: 0
height header-line: 0 mode-line: 14 divider: 0
::: Requested WIDTH: 101, HEIGHT: 69
frame pixel: 728 x 828 cols/lines: 104 x 69 units: 7 x 12
frame text pixel: 707 x 828 cols/lines: 101 x 69
tool: 0 scroll: 21 fringe: 0 border: 0 right: 2 bottom: 2
w32-rect: (0 0 736 884), (0 0 728 804)
#<window 30 on throw-fit-frm.el> parent: nil
pixel left: 0 top: 0 size: 728 x 828 new: 0
char left: 0 top: 0 size: 104 x 69 new: 0
normal: 1.0 x 1.0 new: 0
body pixel: 707 x 814 char: 101 x 67
width left fringe: 0 left margin: 0 right margin: 0
width right fringe: 0 scroll-bar: 21 divider: 0
height header-line: 0 mode-line: 14 divider: 0
next prev parent reply other threads:[~2014-03-09 16:35 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-02 20:05 bug#16923: 24.3.50; reression: `set-frame-size' loses mode line Drew Adams
2014-03-02 20:51 ` Eli Zaretskii
2014-03-03 8:29 ` martin rudalics
2014-03-03 14:43 ` Drew Adams
2014-03-03 18:37 ` martin rudalics
2014-03-03 19:17 ` Drew Adams
2014-03-03 19:43 ` martin rudalics
2014-03-03 21:07 ` Drew Adams
2014-03-04 8:08 ` martin rudalics
2014-03-04 18:45 ` Drew Adams
2014-03-05 7:26 ` martin rudalics
2014-03-05 15:43 ` Drew Adams
2014-03-05 16:02 ` Juanma Barranquero
2014-03-05 18:20 ` martin rudalics
2014-03-05 18:32 ` Drew Adams
2014-03-05 19:28 ` martin rudalics
2014-03-05 19:42 ` Drew Adams
2014-03-05 19:53 ` martin rudalics
2014-03-05 21:23 ` Drew Adams
2014-03-06 17:26 ` martin rudalics
2014-03-06 18:25 ` Drew Adams
2014-03-06 18:54 ` martin rudalics
2014-03-06 20:51 ` Drew Adams
2014-03-06 21:26 ` martin rudalics
2014-03-06 21:51 ` Drew Adams
2014-03-07 7:39 ` martin rudalics
2014-03-07 16:48 ` Drew Adams
2014-03-07 17:48 ` martin rudalics
2014-03-07 18:09 ` Drew Adams
2014-03-07 18:36 ` martin rudalics
2014-03-07 19:13 ` Drew Adams
2014-03-08 9:11 ` martin rudalics
2014-03-08 15:34 ` Drew Adams
2014-03-08 15:48 ` Eli Zaretskii
2014-03-08 18:59 ` martin rudalics
2014-03-08 18:59 ` martin rudalics
2014-03-08 19:12 ` Drew Adams
2014-03-08 19:54 ` martin rudalics
2014-03-08 22:51 ` Drew Adams
2014-03-09 13:56 ` martin rudalics
2014-03-09 16:35 ` Drew Adams [this message]
2014-03-09 18:13 ` martin rudalics
2014-03-09 19:14 ` Drew Adams
2014-03-10 9:04 ` martin rudalics
2014-03-28 15:29 ` Drew Adams
2014-03-28 19:28 ` martin rudalics
2019-08-15 1:08 ` Lars Ingebrigtsen
2019-08-15 1:32 ` Drew Adams
2014-03-05 20:05 ` Eli Zaretskii
2014-03-03 15:54 ` Eli Zaretskii
[not found] <<b3d29ce8-c0cb-442e-9e6d-fda3d349c778@default>
[not found] ` <<834n3gtjco.fsf@gnu.org>
2014-03-02 21:53 ` Drew Adams
[not found] ` <<53143D5C.7020000@gmx.at>
[not found] ` <<a2349e72-8172-4652-a980-890f813bc623@default>
[not found] ` <<5314CBE1.6050905@gmx.at>
[not found] ` <<04dda5ae-8b70-42f5-ae09-c1d05ebc9297@default>
[not found] ` <<5314DB5D.50709@gmx.at>
[not found] ` <<29b76228-778a-4aea-8fe4-5abedb5b6795@default>
[not found] ` <<531589F3.1050300@gmx.at>
[not found] ` <<70615a8e-3923-40c3-bfbc-af0a305cd6df@default>
[not found] ` <<5316D1B5.8040801@gmx.at>
[not found] ` <<a2e7f767-2129-4d48-97f4-18b8fbfd6af7@default>
[not found] ` <<53176AF2.9010800@gmx.at>
[not found] ` <<edc5b3cb-8cbd-47fa-aa9e-be9372c43863@default>
[not found] ` <<53177AEF.9050106@gmx.at>
[not found] ` <<83d2i0qulk.fsf@gnu.org>
2014-03-05 21:02 ` Drew Adams
2014-03-06 3:41 ` Eli Zaretskii
[not found] ` <<3f31643f-2638-4ada-8dc4-b3069f3a82fc@default>
[not found] ` <<531780D7.6070109@gmx.at>
[not found] ` <<291bd9d5-923f-440a-821a-06f585557e67@default>
[not found] ` <<5318AFD9.4000208@gmx.at>
[not found] ` <<8be91728-fcea-4e74-afff-db6a55b52985@default>
[not found] ` <<5318C478.1090007@gmx.at>
[not found] ` <<0f1c6cae-f9cd-4a2b-a662-bcc4116daafc@default>
[not found] ` <<5318E810.7000705@gmx.at>
[not found] ` <<dbc69634-37da-4dcf-a7c6-6c43184b4b6c@default>
[not found] ` <<531977B2.8030109@gmx.at>
[not found] ` <<f46ec99a-8a39-44f2-bf49-7845e1461a3e@default>
[not found] ` <<531A0655.5040400@gmx.at>
[not found] ` <<5e0232ee-58e3-42a3-8102-e12e8e605b2b@default>
[not found] ` <<531A11BE.5070300@gmx.at>
[not found] ` <<738285f8-0119-49cd-b5b5-7e9607fadff3@default>
[not found] ` <<531ADEBC.9030200@gmx.at>
[not found] ` <<1cb471a0-5db3-4c77-90ff-ed8aa2c9bd0b@default>
[not found] ` <<83lhwkpu87.fsf@gnu.org>
2014-03-08 15:56 ` Drew Adams
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=2bd68fd8-79a5-49be-80fe-c53d4a689320@default \
--to=drew.adams@oracle.com \
--cc=16923@debbugs.gnu.org \
--cc=rudalics@gmx.at \
/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).