From: Robert Pluim <rpluim@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 31745@debbugs.gnu.org, 刘力铭 <mark.liu.li.ming@foxmail.com>
Subject: bug#31745: 回复: bug#31745: 回复:回复:Re: 回复:bug#31745: Frame's bug whenwindow-system
Date: Fri, 22 Jun 2018 16:44:25 +0200 [thread overview]
Message-ID: <87r2ky2852.fsf@gmail.com> (raw)
In-Reply-To: <5B2CB9B3.1000600@gmx.at> (martin rudalics's message of "Fri, 22 Jun 2018 10:56:19 +0200")
[-- Attachment #1: Type: text/plain, Size: 2248 bytes --]
martin rudalics <rudalics@gmx.at> writes:
>> It seems like thereʼs some kind of race condition going on when
>> creating the initial frame. It seems pretty sensitive though, as soon
>> as I start looking for the cause it goes away.
>
> You could try setting 'frame-size-history' to something like '(1000)
> and look at what 'frame--size-history' tells. Since this does not
> cover the initial frame, you may have to do a hard setting in frame.c.
>
So when everything kinda works:
(965
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(set-window-configuration 1))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-3
(1820 1680 1120 1080)
(1849 1680 1149 1080))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1820 1680 1120 1080)
(change-frame-size 5))
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-resized
(1820 1680 1120 1080)
nil)
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-3
(1120 1080 1820 1680)
(1149 1080 1849 1680))
So we start small, go big, then go small again, but the end result,
even though it looks correct, is actually wrong:
(frame-parameter nil 'height)
36
(frame-parameter nil 'width)
80
Although I asked for:
(add-to-list 'default-frame-alist '(width . 130))
(add-to-list 'default-frame-alist '(height . 56))
in the .el Iʼm loading.
When it doesnʼt work:
(967
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1820 1680 1820 1680)
(set-window-configuration 1))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-3
(1120 1080 1820 1680)
(1149 1080 1849 1680))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1820 1680)
(change-frame-size 5))
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-resized
(1120 1080 1120 1080)
nil)
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-set-char-size-3
(1120 1080 1120 1080)
(1149 1183))
we start big, go small, and stay small. The frame is actually the same
size as previous, but emacs' state is messed up:
(frame-parameter nil 'height)
56
(frame-parameter nil 'width)
130
Iʼve attached both full traces.
Robert
[-- Attachment #2: 31745-trace.OK --]
[-- Type: text/plain, Size: 4503 bytes --]
frame-size-history is a variable defined in ‘C source code’.
Its value is shown below.
Documentation:
History of frame size adjustments.
If non-nil, list recording frame size adjustment. Adjustments are
recorded only if the first element of this list is a positive number.
Adding an adjustment decrements that number by one.
The remaining elements are the adjustments. Each adjustment is a list
of four elements ‘frame’, ‘function’, ‘sizes’ and ‘more’. ‘frame’ is
the affected frame and ‘function’ the invoking function. ‘sizes’ is
usually a list of four elements ‘old-width’, ‘old-height’, ‘new-width’
and ‘new-height’ representing the old and new sizes recorded/requested
by ‘function’. ‘more’ is a list with additional information.
The function ‘frame--size-history’ displays the value of this variable
in a more readable form.
Value:
(965
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(set-window-configuration 1))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-3
(1820 1680 1120 1080)
(1849 1680 1149 1080))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1820 1680 1120 1080)
(change-frame-size 5))
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-resized
(1820 1680 1120 1080)
nil)
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-3
(1120 1080 1820 1680)
(1149 1080 1849 1680))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1820 1680)
(change-frame-size 5))
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-set-char-size-3
(1120 1080 1120 1080)
(1149 1183))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-2
(1120 1080 1120 1080)
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(tool-bar-lines 2))
(#<frame emacs@rpluim-ubuntu 0x133fd20> update-frame-tool-bar nil nil)
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-resized
(1120 1080 1820 1680)
nil)
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-set-char-size-3
(1120 1080 1820 1680)
(1849 1725))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-2
(1120 1080 1820 1680)
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1820 1680)
(x-set-frame-parameters 1))
(#<frame emacs@rpluim-ubuntu 0x133fd20> "FRAME-NOTICE-USER" nil
((height . 56)
(width . 130)
(left . 0)
(top . 0)))
(#<frame emacs@rpluim-ubuntu 0x133fd20> "MAKE-FRAME")
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-handle-net-wm-state nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-handle-net-wm-state nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-handle-net-wm-state nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-handle-net-wm-state nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-handle-net-wm-state nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-resized
(1120 1080 1120 1080)
nil)
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-set-fullscreen nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(xg-frame-set-char-size 5))
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-set-char-size-3
(1120 1080 1120 1080)
(1149 1125))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-2
(1120 1080 1120 1080)
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(x-create-frame-2 0))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(menu-bar-lines 2))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(scroll-bar-height 3))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-3
(1120 1080 1120 1080)
(1136 1080 1149 1080))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(scroll-bar-width 3))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-3
(10 10 140 300)
(10 10 156 300))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(10 10 140 300)
(x-create-frame-1 5))
(#<dead frame F1 0xc89040> adjust-frame-size-3
(10 10 10 9)
(10 10 10 10))
(#<dead frame F1 0xc89040> adjust-frame-size-1
(10 10 10 9)
(change-frame-size 5)))
[-- Attachment #3: 31745-trace.NOK --]
[-- Type: text/plain, Size: 4273 bytes --]
frame-size-history is a variable defined in ‘C source code’.
Its value is shown below.
Documentation:
History of frame size adjustments.
If non-nil, list recording frame size adjustment. Adjustments are
recorded only if the first element of this list is a positive number.
Adding an adjustment decrements that number by one.
The remaining elements are the adjustments. Each adjustment is a list
of four elements ‘frame’, ‘function’, ‘sizes’ and ‘more’. ‘frame’ is
the affected frame and ‘function’ the invoking function. ‘sizes’ is
usually a list of four elements ‘old-width’, ‘old-height’, ‘new-width’
and ‘new-height’ representing the old and new sizes recorded/requested
by ‘function’. ‘more’ is a list with additional information.
The function ‘frame--size-history’ displays the value of this variable
in a more readable form.
Value:
(967
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1820 1680 1820 1680)
(set-window-configuration 1))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-3
(1120 1080 1820 1680)
(1149 1080 1849 1680))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1820 1680)
(change-frame-size 5))
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-resized
(1120 1080 1120 1080)
nil)
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-set-char-size-3
(1120 1080 1120 1080)
(1149 1183))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-2
(1120 1080 1120 1080)
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(tool-bar-lines 2))
(#<frame emacs@rpluim-ubuntu 0x133fd20> update-frame-tool-bar nil nil)
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-resized
(1120 1080 1820 1680)
nil)
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-set-char-size-3
(1120 1080 1820 1680)
(1849 1725))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-2
(1120 1080 1820 1680)
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1820 1680)
(x-set-frame-parameters 1))
(#<frame emacs@rpluim-ubuntu 0x133fd20> "FRAME-NOTICE-USER" nil
((height . 56)
(width . 130)
(left . 0)
(top . 0)))
(#<frame emacs@rpluim-ubuntu 0x133fd20> "MAKE-FRAME")
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-handle-net-wm-state nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-handle-net-wm-state nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-handle-net-wm-state nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-handle-net-wm-state nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-handle-net-wm-state nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-resized
(1120 1080 1120 1080)
nil)
(#<frame emacs@rpluim-ubuntu 0x133fd20> x-set-fullscreen nil
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(xg-frame-set-char-size 5))
(#<frame emacs@rpluim-ubuntu 0x133fd20> xg-frame-set-char-size-3
(1120 1080 1120 1080)
(1149 1125))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-2
(1120 1080 1120 1080)
(nil nil))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(x-create-frame-2 0))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(menu-bar-lines 2))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(scroll-bar-height 3))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-3
(1120 1080 1120 1080)
(1136 1080 1149 1080))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(1120 1080 1120 1080)
(scroll-bar-width 3))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-3
(10 10 140 300)
(10 10 156 300))
(#<frame emacs@rpluim-ubuntu 0x133fd20> adjust-frame-size-1
(10 10 140 300)
(x-create-frame-1 5))
(#<dead frame F1 0xc89040> adjust-frame-size-3
(10 10 10 9)
(10 10 10 10))
(#<dead frame F1 0xc89040> adjust-frame-size-1
(10 10 10 9)
(change-frame-size 5)))
next prev parent reply other threads:[~2018-06-22 14:44 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tencent_31247D97CC59228818C55E91FB6828E17407@qq.com>
2018-06-08 11:33 ` bug#31745: 回复: bug#31745: 回复:Re: 回复:bug#31745: Frame's bug whenwindow-system Robert Pluim
[not found] ` <tencent_77BD98CBDECAFB6E2884F40BFD81CC292207@qq.com>
2018-06-08 12:43 ` bug#31745: 回复: bug#31745: 回复:回复:Re: " Robert Pluim
2018-06-21 11:41 ` Noam Postavsky
2018-06-21 11:59 ` Robert Pluim
2018-06-22 8:56 ` martin rudalics
2018-06-22 14:44 ` Robert Pluim [this message]
2018-06-23 8:40 ` martin rudalics
2018-06-27 9:01 ` Robert Pluim
2018-06-28 8:02 ` martin rudalics
2018-06-28 8:25 ` Robert Pluim
2018-06-28 8:33 ` martin rudalics
2018-06-28 9:06 ` Robert Pluim
2018-06-28 12:25 ` martin rudalics
2018-06-28 14:15 ` Robert Pluim
2018-06-29 8:42 ` martin rudalics
2018-06-29 11:57 ` Robert Pluim
2018-06-30 8:34 ` martin rudalics
2018-06-30 9:13 ` Robert Pluim
2018-07-01 9:02 ` martin rudalics
2018-07-02 4:58 ` bug#31745: �ظ��� bug#31745: �ظ����ظ���Re: �ظ���bug#31745: " �����
2018-07-02 14:31 ` bug#31745: 回复: bug#31745: 回复:回复:Re: 回复:bug#31745: " Robert Pluim
2018-07-02 15:26 ` bug#31745: bug#31745: �ظ����ظ����ظ���Re: �ظ���bug#31745: Frame'sbug whenwindow-system �����
2022-04-28 10:42 ` bug#31745: default-frame-alist sizing parameters set in ~/.emacs are not applied correctly Lars Ingebrigtsen
2022-05-26 12:49 ` Lars Ingebrigtsen
2018-06-22 15:30 ` bug#31745: �ظ��� bug#31745: �ظ��� bug#31745: �ظ����ظ���Re: �ظ���bug#31745: Frame's bug whenwindow-system �����
2018-06-23 8:40 ` bug#31745: 回复: bug#31745: 回复: bug#31745: 回复:回复:Re: 回复:bug#31745: " martin rudalics
2018-06-23 11:50 ` bug#31745: �ظ��� bug#31745: �ظ��� bug#31745: �ظ����ظ���Re: �ظ���bug#31745: " �����
2018-06-27 7:34 ` bug#31745: 回复: bug#31745: 回复: bug#31745: 回复:回复:Re: 回复:bug#31745: " martin rudalics
2018-06-27 9:13 ` Robert Pluim
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=87r2ky2852.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=31745@debbugs.gnu.org \
--cc=mark.liu.li.ming@foxmail.com \
--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).