From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs geometry Date: Fri, 28 Jul 2006 13:08:52 +0300 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1154081359 1545 80.91.229.2 (28 Jul 2006 10:09:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Jul 2006 10:09:19 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 28 12:09:19 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G6PHQ-0005Hr-0n for ged-emacs-devel@m.gmane.org; Fri, 28 Jul 2006 12:09:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G6PHP-0006Wi-IG for ged-emacs-devel@m.gmane.org; Fri, 28 Jul 2006 06:09:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G6PHD-0006VC-PQ for emacs-devel@gnu.org; Fri, 28 Jul 2006 06:09:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G6PHC-0006UD-LV for emacs-devel@gnu.org; Fri, 28 Jul 2006 06:09:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G6PHC-0006U2-47 for emacs-devel@gnu.org; Fri, 28 Jul 2006 06:09:02 -0400 Original-Received: from [192.114.186.73] (helo=heller.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G6PJ9-0001oF-Ge for emacs-devel@gnu.org; Fri, 28 Jul 2006 06:11:03 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-69-248.inter.net.il [80.230.69.248]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id ACG78756 (AUTH halo1); Fri, 28 Jul 2006 13:08:53 +0300 (IDT) Original-To: Ralf Angeli In-reply-to: (message from Ralf Angeli on Thu, 27 Jul 2006 23:58:47 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57728 Archived-At: > From: Ralf Angeli > Date: Thu, 27 Jul 2006 23:58:47 +0200 > > >> The trick is to [...] call w32_get_arg to look up left and top in > >> initial-frame-alist > > > > Sorry, this part was bad advice: you cannot look up left and top in > > initial-frame-alist, > > Hm, couldn't one get the value from the Lisp level? Of course, you could: use `intern'. But I suspect that, by the time w32_createwindow runs, the left and top frame parameters were already removed from initial-frame-alist and put into the `top_pos' and `left_pos' members of struct frame that is passed to w32_createwindow. But please verify that, I could be wrong. > > you should instead honor f->left_pos and > > f->top_pos, if they were set from initial-frame-alist. The problem is > > to decide correctly when to honor them. > > One could probably use the > if (!hprevinst) > test in w32_createwindow in order to decide if it's the first frame to > be created, but how can one decide if there are values for `top' and > `left' which are only relevant for the first frame? I didn't figure out that bit yet. One thing to try is trace the execution from the point where w32-win.el puts the values into initial-frame-alist and till the call to w32_createwindow, and see if that gives you any ideas. > That's where `initial-frame-alist' would really come in handy. I think when w32_createwindow is called, the contents of initial-frame-alist are in f->params_alist. So accessing that is easy. The problem is, the left and top parameters are not there. Maybe if you compare f->top_pos and f->left_pos with the corresponding frame parameters in f->params_alist, for different calls to w32_createwindow, you will see how to identify that the initial frame is being created. > I guess I'll need a little bit more time for this. There's no hurry. Thanks.