From: martin rudalics <rudalics@gmx.at>
To: eliz@gnu.org, 18528@debbugs.gnu.org
Subject: bug#18528: 24.3.93; Crash during restoration of frameset from desktop
Date: Mon, 22 Sep 2014 19:43:43 +0200 [thread overview]
Message-ID: <54205FCF.4050503@gmx.at> (raw)
In-Reply-To: <83egv3y90k.fsf@gnu.org>
> (gdb) p f->text_cols
> $6 = -3 <<<<<<<<<<<<<<<<<<<
What is the value of f->text_width here?
> (We also don't check errors returned by
> GetClientRect.)
Should we? I wonder already why
if (f && !FRAME_ICONIFIED_P (f) && msg.msg.wParam != SIZE_MINIMIZED)
in w32_read_socket didn't catch this.
> . change_frame_size internally validates the requested dimensions,
> and doesn't allow them to become too small. But it does that on
> pixel dimensions, and if those are corrected, the character-unit
> dimensions are not recalculated to reflect those corrections.
That's the bug.
> + if (GetClientRect (msg.msg.hwnd, &rect)
> + /* GetClientRect evidently returns (0, 0, 0, 0) if
> + called on a minimized frame. Such "dimensions"
> + aren't useful anyway. */
> + && !(rect.bottom == 0
> + && rect.top == 0
> + && rect.left == 0
> + && rect.right == 0))
It certainly can't harm to do that but I doubt whether it's worth to
include a similar change for the other platforms.
> + ssize_t frame_message_buf_size = FRAME_MESSAGE_BUF_SIZE (f);
> +
> + eassert (frame_message_buf_size >= 0);
Good. This part should definitely go to the trunk too.
> + /* Recompute the dimensions in character units, since
> + check_frame_size might have changed the pixel dimensions. */
> + /* Consider rounding here: Currently, the root window can be
> + larger than the frame in terms of columns/lines. */
> + new_cols = new_text_width / FRAME_COLUMN_WIDTH (f);
> + new_lines = new_text_height / FRAME_LINE_HEIGHT (f);
This part should fix the problem for all platforms.
Please check it in but please also make sure that only the changes in
adjust_decode_mode_spec_buffer and maybe those of w32_read_socket get
propagated to the trunk. Did you verify that the trunk handles your
.emacs.desktop correctly?
Many thanks, martin
next prev parent reply other threads:[~2014-09-22 17:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 15:23 bug#18528: 24.3.93; Crash during restoration of frameset from desktop Eli Zaretskii
2014-09-22 17:43 ` martin rudalics [this message]
2014-09-22 18:13 ` Eli Zaretskii
2014-09-23 5:48 ` martin rudalics
2014-09-23 15:26 ` Eli Zaretskii
2014-09-23 16:15 ` martin rudalics
2014-09-23 18:46 ` Eli Zaretskii
2014-09-23 19:17 ` martin rudalics
2014-09-23 19:30 ` Eli Zaretskii
2014-09-23 19:42 ` Eli Zaretskii
2014-09-24 6:16 ` martin rudalics
2014-09-24 7:15 ` Eli Zaretskii
2014-09-24 7:33 ` Eli Zaretskii
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=54205FCF.4050503@gmx.at \
--to=rudalics@gmx.at \
--cc=18528@debbugs.gnu.org \
--cc=eliz@gnu.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).