unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: penthief <penthief@SDF.ORG>
Cc: 17876@debbugs.gnu.org
Subject: bug#17876: 24.3; Incorrect frame resize
Date: Fri, 04 Dec 2020 12:46:37 +0100	[thread overview]
Message-ID: <87blf9iyjm.fsf@gnus.org> (raw)
In-Reply-To: <d45092b70b51ea47b802cb763206575f@SDF.ORG> (penthief@sdf.org's message of "Sun, 29 Jun 2014 15:50:54 +0100")

penthief <penthief@SDF.ORG> writes:

> When setting the a font on a frame after a resize, there is an apparent
> race condition that more often than not, causes the frame height
> and/or width to be reset to an incorrect value.
>
> This behaviour also occurs on 24.3.92.
>
> 1. Create a file bug-frame-resize.el with the following contents
> (assuming that Courier and Monaco are present on the system).
>
> (setq -last-used-font nil)
> (setq -target-font-1 "Courier")
> (setq -target-font-2 "Monaco")
> (setq -target-height 5)
> (setq -target-width 5)
>
> (defun bug-frame-resize ()
>   (interactive)
>   (with-selected-frame (make-frame)
>     (set-frame-width (selected-frame) -target-width)
>     (set-frame-height (selected-frame) -target-height)
>     (let ((target-font (if (equal -last-used-font -target-font-1)
> 			   -target-font-2
> 			 -target-font-1)))
>       (setq -last-used-font target-font)
>       (set-frame-font target-font))))
>
> 2. Start emacs
>
> $ /usr/bin/emacs24-x -Q -l bug-frame-resize.el
>
> 3. Type "M-x bug-frame-resize" four or five times.
>
> The frames appear with the correct size briefly, but then resize after
> a split second. On this machine this usually results one of the height
> or width is incorrect on each of the created frames.

(This bug report unfortunately got no response at the time.)

I tried reproducing this in Emacs 28 on Debian/bullseye, but was unable
to.  All the Monaco frames have the exact same width/height, and so do
all the Courier frames.

Do you still see this issue in more recent Emacs versions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2020-12-04 11:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-29 14:50 bug#17876: 24.3; Incorrect frame resize penthief
2020-12-04 11:46 ` Lars Ingebrigtsen [this message]
2020-12-04 12:15   ` Lars Ingebrigtsen

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=87blf9iyjm.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=17876@debbugs.gnu.org \
    --cc=penthief@SDF.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).