all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ralf Angeli <angeli@caeruleus.net>
Subject: Re: Emacs geometry
Date: Tue, 01 Aug 2006 22:09:26 +0200	[thread overview]
Message-ID: <eaocdl$ao4$1@sea.gmane.org> (raw)
In-Reply-To: ur701m9h3.fsf@gnu.org

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

* Eli Zaretskii (2006-08-01) writes:

>> From: Ralf Angeli <angeli@caeruleus.net>
>
>> Now as there doesn't seem to be anything in f->param_alist regarding
>> top or left I guess we can go for `initial-frame-alist'.
>
> Yes.

Okay, here is the patch:

2006-08-01  Ralf Angeli  <angeli@caeruleus.net>

	* w32fns.c (w32_createwindow): Handle geometry command line option
	and registry key.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1475 bytes --]

--- w32fns.c	27 Jul 2006 22:00:10 +0200	1.272
+++ w32fns.c	01 Aug 2006 22:02:00 +0200	
@@ -2066,7 +2066,8 @@
 {
   HWND hwnd;
   RECT rect;
-  Lisp_Object top, left;
+  Lisp_Object top = Qunbound;
+  Lisp_Object left = Qunbound;
 
   rect.left = rect.top = 0;
   rect.right = FRAME_PIXEL_WIDTH (f);
@@ -2079,13 +2080,27 @@
 
   if (!hprevinst)
     {
+      Lisp_Object ifa;
+
       w32_init_class (hinst);
+
+      /* Handle geometry command line option and registry key. */
+      ifa = Fsymbol_value (intern ("initial-frame-alist"));
+      if (CONSP (ifa) && Fassq (Qleft, ifa)
+	  && INTEGERP (XCDR (Fassq (Qleft, ifa))))
+	left = XCDR (Fassq (Qleft, ifa));
+      if (CONSP (ifa) && Fassq (Qtop, ifa)
+	  && INTEGERP (XCDR (Fassq (Qtop, ifa))))
+	top = XCDR (Fassq (Qtop, ifa));
     }
 
-  /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero
-     for anything that is not a number and is not Qunbound.  */
-  left = w32_get_arg (Qnil, Qleft, "left", "Left", RES_TYPE_NUMBER);
-  top = w32_get_arg (Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER);
+  if (EQ (left, Qunbound) && EQ (top, Qunbound))
+    {
+      /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero
+	 for anything that is not a number and is not Qunbound.  */
+      left = w32_get_arg (Qnil, Qleft, "left", "Left", RES_TYPE_NUMBER);
+      top = w32_get_arg (Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER);
+    }
 
   FRAME_W32_WINDOW (f) = hwnd
     = CreateWindow (EMACS_CLASS,

[-- Attachment #3: Type: text/plain, Size: 10 bytes --]


-- 
Ralf

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  parent reply	other threads:[~2006-08-01 20:09 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-24 20:21 Emacs geometry Sridhar Boovaraghavan
2006-07-24 21:25 ` Drew Adams
2006-07-25  3:27   ` Eli Zaretskii
2006-07-25  4:15     ` Drew Adams
2006-07-25  6:20       ` Ralf Angeli
2006-07-25 13:41         ` Drew Adams
2006-07-25 18:24           ` Eli Zaretskii
2006-07-25 18:56             ` Drew Adams
2006-07-25 20:08               ` Eli Zaretskii
2006-07-25 21:18                 ` Drew Adams
2006-07-25 22:07                   ` Jason Rumney
2006-07-26  0:36                     ` Drew Adams
2006-07-26  4:57                       ` Sridhar Boovaraghavan
2006-07-26  6:38                         ` Eli Zaretskii
2006-07-26 14:00                           ` Drew Adams
2006-07-26  8:46                         ` Jason Rumney
2006-07-26 14:00                           ` Drew Adams
2006-07-26 14:35                             ` Mathias Dahl
2006-07-26 16:02                             ` Jason Rumney
2006-07-25 13:48         ` Drew Adams
2006-07-25 18:07         ` Eli Zaretskii
2006-07-25 18:55           ` Ralf Angeli
2006-07-25 19:58             ` Eli Zaretskii
2006-07-25 20:41               ` Eli Zaretskii
2006-07-27 21:58                 ` Ralf Angeli
2006-07-28 10:08                   ` Eli Zaretskii
2006-07-30 20:30                     ` Ralf Angeli
2006-07-30 20:33                       ` David Kastrup
2006-07-30 20:38                       ` Eli Zaretskii
2006-07-30 20:48                         ` David Kastrup
2006-07-30 21:22                           ` Eli Zaretskii
2006-07-30 20:41                       ` Eli Zaretskii
2006-07-30 21:09                         ` Ralf Angeli
2006-07-30 21:27                           ` Eli Zaretskii
2006-07-30 21:46                             ` Ralf Angeli
2006-07-31  3:17                               ` Eli Zaretskii
2006-07-31 19:06                                 ` Ralf Angeli
2006-07-31 20:03                                   ` Eli Zaretskii
2006-07-31 21:37                                     ` Ralf Angeli
2006-07-31 23:51                                       ` Nick Roberts
2006-08-01  2:52                                         ` Nick Roberts
2006-08-01 17:55                                           ` Ralf Angeli
2006-08-02  3:19                                             ` Eli Zaretskii
2006-08-01  3:16                                       ` Eli Zaretskii
2006-08-01  5:47                                         ` Ralf Angeli
2006-08-01 20:09                                         ` Ralf Angeli [this message]
2006-08-04 11:39                                           ` Eli Zaretskii
2006-08-05 14:05                                             ` Ralf Angeli
2006-08-06  3:16                                               ` Eli Zaretskii
2006-07-30 22:17                       ` Kim F. Storm
2006-07-30 22:44                         ` Ralf Angeli
2006-07-30 22:53                           ` David Kastrup
2006-07-31 16:17                           ` Stefan Monnier
2006-07-31 19:07                             ` Ralf Angeli
2006-07-28  2:57                 ` YAMAMOTO Mitsuharu
2006-07-25 21:29               ` Ralf Angeli
2006-07-26  3:14                 ` Eli Zaretskii
2006-08-04 11:44                 ` Eli Zaretskii
2006-07-25 18:06       ` Eli Zaretskii
2006-07-25  3:26 ` Eli Zaretskii
2006-07-25  4:46   ` Sridhar Boovaraghavan
2006-07-25 18:18     ` Ralf Angeli
2006-07-25 18:22     ` Eli Zaretskii
     [not found] <E925E59A6745554D82E04F24445BFF8D479497@limx3m1.lim.emea.dell.com>
2006-07-27 15:21 ` Drew Adams
2006-07-27 15:40   ` Jason Rumney
     [not found] <E925E59A6745554D82E04F24445BFF8D47949A@limx3m1.lim.emea.dell.com>
2006-07-27 15:49 ` Drew Adams
2006-07-28  9:52   ` Eli Zaretskii
2006-07-28 10:07     ` Robert_Thorpe
2006-07-28 10:18       ` Eli Zaretskii
2006-07-28 10:58     ` Jason Rumney
2006-07-28 13:45     ` Drew Adams
2006-07-28 22:04       ` Nick Roberts
2006-07-28 23:03         ` Drew Adams
2006-07-28 23:45           ` Nick Roberts
2006-07-29  8:37       ` Eli Zaretskii
2006-07-29 14:42         ` Drew Adams
2006-07-29 14:54           ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='eaocdl$ao4$1@sea.gmane.org' \
    --to=angeli@caeruleus.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.