From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37415: Asserting failure setting frame parameters to non-fixnum values in early-init.el Date: Sun, 22 Sep 2019 21:19:57 +0300 Message-ID: <83pnjsp50y.fsf@gnu.org> References: <83v9tqvrm7.fsf@gnu.org> <9aae1b2e-bb5f-8634-5501-9aaff9f51266@gmx.at> <83imppvl9r.fsf@gnu.org> <14d4a455-254e-fdc2-0b64-791cfb0f7724@gmx.at> <83o8zgtlvq.fsf@gnu.org> <0936d492-c2bc-d4d3-7fcf-272d0fdbe087@gmx.at> <83a7ayss4b.fsf@gnu.org> <7b896377-d546-b428-adba-797ec988c4fa@gmx.at> <83r24aqadz.fsf@gnu.org> <83ftkprfzx.fsf@gnu.org> <83y2ygp9hz.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="142517"; mail-complaints-to="usenet@blaine.gmane.org" Cc: lekktu@gmail.com, 37415@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 22 20:20:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iC6T1-000awh-15 for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Sep 2019 20:20:15 +0200 Original-Received: from localhost ([::1]:48192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iC6Sz-0005un-Ci for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Sep 2019 14:20:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37490) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iC6Sp-0005ug-9D for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 14:20:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iC6So-0003OJ-8x for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 14:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53926) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iC6So-0003OC-5q for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 14:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iC6Sn-0001p4-V1 for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 14:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Sep 2019 18:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37415 X-GNU-PR-Package: emacs Original-Received: via spool by 37415-submit@debbugs.gnu.org id=B37415.15691763986991 (code B ref 37415); Sun, 22 Sep 2019 18:20:01 +0000 Original-Received: (at 37415) by debbugs.gnu.org; 22 Sep 2019 18:19:58 +0000 Original-Received: from localhost ([127.0.0.1]:34514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC6Sk-0001oh-8J for submit@debbugs.gnu.org; Sun, 22 Sep 2019 14:19:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC6Si-0001oQ-1i for 37415@debbugs.gnu.org; Sun, 22 Sep 2019 14:19:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iC6Sc-0003Kz-Ut; Sun, 22 Sep 2019 14:19:50 -0400 Original-Received: from [176.228.60.248] (port=1913 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iC6Sb-0001bd-VP; Sun, 22 Sep 2019 14:19:50 -0400 In-reply-to: (message from martin rudalics on Sun, 22 Sep 2019 19:54:00 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 209.51.188.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:166937 Archived-At: > Cc: lekktu@gmail.com, 37415@debbugs.gnu.org > From: martin rudalics > Date: Sun, 22 Sep 2019 19:54:00 +0200 > > > No, I don't think using x_get_arg is wrong, because we still want to > > determine whether to use CW_USEDEFAULT. > > Hmm ... > > > We cannot do this unless f->size_hint_flags are set so as to tell > > w32_createwindow to use f->top_pos and/or f->left_pos. Otherwise, we > > should put CW_USEDEFAULT in coords[]. IOW, how about the below? > [...] > > + if (!(f->size_hint_flags & USPosition || f->size_hint_flags & PPosition)) > > + { > > + /* When called with RES_TYPE_NUMBER, and there's no 'top' or > > + 'left' parameters in the frame's parameter alist, > > + gui_display_get_arg will return zero for anything that is > > + neither a number nor Qunbound. If frame parameter alist does > > + have 'left' or 'top', they are interpreted by > > + gui_figure_window_size, which was already called, and which > > + sets f->size_hint_flags. */ > > So you mean when size hints are not set, we are sure that > gui_display_get_arg does not find anything in 'default-frame-alist' > (ignoring, BTW 'initial-frame-alist') and finds a number here. This > looks a bit fragile to me. If it's fragile, then we must take a look at gui_figure_window_size, I think. It should handle all those cases which you are afraid of. > Isn't the fact that left/top are unbound sufficient that we should > use CW_USEDEFAULT and f->left_pos/f->top_pos otherwise. I don't know, but in any case we don't need more than one evidence; additional evidence is just redundant. I prefer using the hint flags as the indicator because that explicitly tells us we can use f->top and f->left.