From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#31745: =?UTF-8?Q?=E5=9B=9E=E5=A4=8D=EF=BC=9A?= bug#31745: =?UTF-8?Q?=E5=9B=9E=E5=A4=8D=EF=BC=9A=E5=9B=9E=E5=A4=8D=EF=BC=9ARe:_?= =?UTF-8?Q?=E5=9B=9E=E5=A4=8D=EF=BC=9Abug#31745:?= Frame's bug whenwindow-system Date: Fri, 22 Jun 2018 16:44:25 +0200 Message-ID: <87r2ky2852.fsf@gmail.com> References: <878t7pms1e.fsf@gmail.com> <87r2lho3cg.fsf@gmail.com> <5B2CB9B3.1000600@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1529679062 18330 195.159.176.226 (22 Jun 2018 14:51:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 22 Jun 2018 14:51:02 +0000 (UTC) Cc: 31745@debbugs.gnu.org, =?UTF-8?Q?=E5=88=98=E5=8A=9B=E9=93=AD?= To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 22 16:50:58 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fWNOr-0004Xh-Ui for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jun 2018 16:50:58 +0200 Original-Received: from localhost ([::1]:34554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWNQx-0005qx-Jz for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jun 2018 10:53:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWNJC-0000BU-1L for bug-gnu-emacs@gnu.org; Fri, 22 Jun 2018 10:45:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWNJ8-0004Cc-Rn for bug-gnu-emacs@gnu.org; Fri, 22 Jun 2018 10:45:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52547) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWNJ8-0004CK-Kc for bug-gnu-emacs@gnu.org; Fri, 22 Jun 2018 10:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fWNJ8-0003Fd-65 for bug-gnu-emacs@gnu.org; Fri, 22 Jun 2018 10:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jun 2018 14:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31745 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31745-submit@debbugs.gnu.org id=B31745.152967867812455 (code B ref 31745); Fri, 22 Jun 2018 14:45:02 +0000 Original-Received: (at 31745) by debbugs.gnu.org; 22 Jun 2018 14:44:38 +0000 Original-Received: from localhost ([127.0.0.1]:60444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fWNIj-0003Eo-PD for submit@debbugs.gnu.org; Fri, 22 Jun 2018 10:44:38 -0400 Original-Received: from mail-qk0-f176.google.com ([209.85.220.176]:46253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fWNIh-0003Ea-By for 31745@debbugs.gnu.org; Fri, 22 Jun 2018 10:44:36 -0400 Original-Received: by mail-qk0-f176.google.com with SMTP id o2-v6so3768055qkc.13 for <31745@debbugs.gnu.org>; Fri, 22 Jun 2018 07:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version; bh=fYbF4WMb4xaP+2uS3ztfQcewxuoNyDyb9e072d0rq4g=; b=HJhe+tLQLdT22eKvjTbo6UuQyLWFXeWhKYMtcfC/toMFIWE4LM+FDl38cB3A9uvF3y OkTDz7jiTfxdIQsNw3kQsUN4Qnz91T6PynjaXXoYCkAO26VQ/wS+ALG9AAIvWCi/vBxv crRm8f1tBgo0M9ZR66TYhaHcNx8tNLVKqXEWnzgv9FMwX4hCtBf9ZQevXOJnFtNc6yys eayh50EPVyFmUOGQEmBOLMFOS9nWQgkzhPFfdv2GEBrI+qXlgC22qEjzOwL5v2IFK0ls MzwYuOh6TlwidXxKNTXmtqmBtpTroRUO4TQQm7+rxXVrOFZzY/C2k/lKenmUBsNkZL9H UZUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=fYbF4WMb4xaP+2uS3ztfQcewxuoNyDyb9e072d0rq4g=; b=kyI+kl9PNhbqccT7bEe2qjBVkdTLV3wvL4dAiScb1GlOp8B8smj2+jT+LnqEuDTH55 Ff0LRNdcFuDiM0dEY0fCvCoghfPaHeUlvdRjgdOJaXkcalmo9VAPk/Cu8w7qlm8rHzc8 ub0L7oC7ascRA6sS9zJiQ3+sIjmN0cl8SA9liPNphhZhtjcw42Iy0KUFyvQPu3607NRX ElQIhvHMyM95CId6+F0EO8Bv1EdpLJTioU0zXcg5vsR1fcEFY2qDQeUGjXp9TPXqRuYK kbCxT3KB2zgXUqsBveZKzZ3C89INTuTcg5BWPUiOnIEo9EUI4C6590KWcnHcauTknMUa 1fEw== X-Gm-Message-State: APt69E0nxeNMGlfhqfUxYhbWjMDJGI+oZ6IX1G2k0js95jUYXt66txkF QX0hQgK9Z7cYcm6gfH+krblp82Cyz6Y= X-Google-Smtp-Source: ADUXVKJVNTMVNxerFhegUa/xQmd2uDYg6GTQ6jBv+sSnztVYnc2iuGYLi/o4Ug3w1Lr3HmFqCKxhog== X-Received: by 2002:a37:7c07:: with SMTP id x7-v6mr1620640qkc.224.1529678668977; Fri, 22 Jun 2018 07:44:28 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id k30-v6sm6809565qtc.31.2018.06.22.07.44.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 07:44:27 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <5B2CB9B3.1000600@gmx.at> (martin rudalics's message of "Fri, 22 Jun 2018 10:56:19 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147743 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable martin rudalics writes: >> It seems like there=CA=BCs 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 (# adjust-frame-size-1 (1120 1080 1120 1080) (set-window-configuration 1)) (# adjust-frame-size-3 (1820 1680 1120 1080) (1849 1680 1149 1080)) (# adjust-frame-size-1 (1820 1680 1120 1080) (change-frame-size 5)) (# xg-frame-resized (1820 1680 1120 1080) nil) (# 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=CA=BCm loading. When it doesn=CA=BCt work: (967 (# adjust-frame-size-1 (1820 1680 1820 1680) (set-window-configuration 1)) (# adjust-frame-size-3 (1120 1080 1820 1680) (1149 1080 1849 1680)) (# adjust-frame-size-1 (1120 1080 1820 1680) (change-frame-size 5)) (# xg-frame-resized (1120 1080 1120 1080) nil) (# 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=CA=BCve attached both full traces. Robert --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=31745-trace.OK Content-Transfer-Encoding: quoted-printable frame-size-history is a variable defined in =E2=80=98C source code=E2=80=99. 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 =E2=80=98frame=E2=80=99, =E2=80=98function=E2=80=99, =E2= =80=98sizes=E2=80=99 and =E2=80=98more=E2=80=99. =E2=80=98frame=E2=80=99 is the affected frame and =E2=80=98function=E2=80=99 the invoking function. = =E2=80=98sizes=E2=80=99 is usually a list of four elements =E2=80=98old-width=E2=80=99, =E2=80=98old-h= eight=E2=80=99, =E2=80=98new-width=E2=80=99 and =E2=80=98new-height=E2=80=99 representing the old and new sizes recorde= d/requested by =E2=80=98function=E2=80=99. =E2=80=98more=E2=80=99 is a list with addit= ional information. The function =E2=80=98frame--size-history=E2=80=99 displays the value of th= is variable in a more readable form. Value: (965 (# adjust-frame-size-1 (1120 1080 1120 1080) (set-window-configuration 1)) (# adjust-frame-size-3 (1820 1680 1120 1080) (1849 1680 1149 1080)) (# adjust-frame-size-1 (1820 1680 1120 1080) (change-frame-size 5)) (# xg-frame-resized (1820 1680 1120 1080) nil) (# adjust-frame-size-3 (1120 1080 1820 1680) (1149 1080 1849 1680)) (# adjust-frame-size-1 (1120 1080 1820 1680) (change-frame-size 5)) (# xg-frame-set-char-size-3 (1120 1080 1120 1080) (1149 1183)) (# adjust-frame-size-2 (1120 1080 1120 1080) (nil nil)) (# adjust-frame-size-1 (1120 1080 1120 1080) (tool-bar-lines 2)) (# update-frame-tool-bar nil nil) (# xg-frame-resized (1120 1080 1820 1680) nil) (# xg-frame-set-char-size-3 (1120 1080 1820 1680) (1849 1725)) (# adjust-frame-size-2 (1120 1080 1820 1680) (nil nil)) (# adjust-frame-size-1 (1120 1080 1820 1680) (x-set-frame-parameters 1)) (# "FRAME-NOTICE-USER" nil ((height . 56) (width . 130) (left . 0) (top . 0))) (# "MAKE-FRAME") (# x-handle-net-wm-state nil (nil nil)) (# x-handle-net-wm-state nil (nil nil)) (# x-handle-net-wm-state nil (nil nil)) (# x-handle-net-wm-state nil (nil nil)) (# x-handle-net-wm-state nil (nil nil)) (# xg-frame-resized (1120 1080 1120 1080) nil) (# x-set-fullscreen nil (nil nil)) (# adjust-frame-size-1 (1120 1080 1120 1080) (xg-frame-set-char-size 5)) (# xg-frame-set-char-size-3 (1120 1080 1120 1080) (1149 1125)) (# adjust-frame-size-2 (1120 1080 1120 1080) (nil nil)) (# adjust-frame-size-1 (1120 1080 1120 1080) (x-create-frame-2 0)) (# adjust-frame-size-1 (1120 1080 1120 1080) (menu-bar-lines 2)) (# adjust-frame-size-1 (1120 1080 1120 1080) (scroll-bar-height 3)) (# adjust-frame-size-3 (1120 1080 1120 1080) (1136 1080 1149 1080)) (# adjust-frame-size-1 (1120 1080 1120 1080) (scroll-bar-width 3)) (# adjust-frame-size-3 (10 10 140 300) (10 10 156 300)) (# adjust-frame-size-1 (10 10 140 300) (x-create-frame-1 5)) (# adjust-frame-size-3 (10 10 10 9) (10 10 10 10)) (# adjust-frame-size-1 (10 10 10 9) (change-frame-size 5))) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=31745-trace.NOK Content-Transfer-Encoding: quoted-printable frame-size-history is a variable defined in =E2=80=98C source code=E2=80=99. 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 =E2=80=98frame=E2=80=99, =E2=80=98function=E2=80=99, =E2= =80=98sizes=E2=80=99 and =E2=80=98more=E2=80=99. =E2=80=98frame=E2=80=99 is the affected frame and =E2=80=98function=E2=80=99 the invoking function. = =E2=80=98sizes=E2=80=99 is usually a list of four elements =E2=80=98old-width=E2=80=99, =E2=80=98old-h= eight=E2=80=99, =E2=80=98new-width=E2=80=99 and =E2=80=98new-height=E2=80=99 representing the old and new sizes recorde= d/requested by =E2=80=98function=E2=80=99. =E2=80=98more=E2=80=99 is a list with addit= ional information. The function =E2=80=98frame--size-history=E2=80=99 displays the value of th= is variable in a more readable form. Value: (967 (# adjust-frame-size-1 (1820 1680 1820 1680) (set-window-configuration 1)) (# adjust-frame-size-3 (1120 1080 1820 1680) (1149 1080 1849 1680)) (# adjust-frame-size-1 (1120 1080 1820 1680) (change-frame-size 5)) (# xg-frame-resized (1120 1080 1120 1080) nil) (# xg-frame-set-char-size-3 (1120 1080 1120 1080) (1149 1183)) (# adjust-frame-size-2 (1120 1080 1120 1080) (nil nil)) (# adjust-frame-size-1 (1120 1080 1120 1080) (tool-bar-lines 2)) (# update-frame-tool-bar nil nil) (# xg-frame-resized (1120 1080 1820 1680) nil) (# xg-frame-set-char-size-3 (1120 1080 1820 1680) (1849 1725)) (# adjust-frame-size-2 (1120 1080 1820 1680) (nil nil)) (# adjust-frame-size-1 (1120 1080 1820 1680) (x-set-frame-parameters 1)) (# "FRAME-NOTICE-USER" nil ((height . 56) (width . 130) (left . 0) (top . 0))) (# "MAKE-FRAME") (# x-handle-net-wm-state nil (nil nil)) (# x-handle-net-wm-state nil (nil nil)) (# x-handle-net-wm-state nil (nil nil)) (# x-handle-net-wm-state nil (nil nil)) (# x-handle-net-wm-state nil (nil nil)) (# xg-frame-resized (1120 1080 1120 1080) nil) (# x-set-fullscreen nil (nil nil)) (# adjust-frame-size-1 (1120 1080 1120 1080) (xg-frame-set-char-size 5)) (# xg-frame-set-char-size-3 (1120 1080 1120 1080) (1149 1125)) (# adjust-frame-size-2 (1120 1080 1120 1080) (nil nil)) (# adjust-frame-size-1 (1120 1080 1120 1080) (x-create-frame-2 0)) (# adjust-frame-size-1 (1120 1080 1120 1080) (menu-bar-lines 2)) (# adjust-frame-size-1 (1120 1080 1120 1080) (scroll-bar-height 3)) (# adjust-frame-size-3 (1120 1080 1120 1080) (1136 1080 1149 1080)) (# adjust-frame-size-1 (1120 1080 1120 1080) (scroll-bar-width 3)) (# adjust-frame-size-3 (10 10 140 300) (10 10 156 300)) (# adjust-frame-size-1 (10 10 140 300) (x-create-frame-1 5)) (# adjust-frame-size-3 (10 10 10 9) (10 10 10 10)) (# adjust-frame-size-1 (10 10 10 9) (change-frame-size 5))) --=-=-=--