aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2006-08-04 11:36:02 +0000
committerEli Zaretskii2006-08-04 11:36:02 +0000
commitdf70725f7a2437a7c1edc39b4119a30016c84690 (patch)
tree0e4fca8fbfdd8ec70b96542f96240755173edaa0 /src
parent65c6c6b6ca9b39fc0d06621db620c5b235e7d45f (diff)
downloademacs-df70725f7a2437a7c1edc39b4119a30016c84690.tar.gz
emacs-df70725f7a2437a7c1edc39b4119a30016c84690.zip
(w32_createwindow): Handle -geometry command line option and the geometry
settings in the Registry.
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c39
1 files changed, 34 insertions, 5 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index a3df8de5338..4c933f0631e 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2066,7 +2066,8 @@ w32_createwindow (f)
2066{ 2066{
2067 HWND hwnd; 2067 HWND hwnd;
2068 RECT rect; 2068 RECT rect;
2069 Lisp_Object top, left; 2069 Lisp_Object top = Qunbound;
2070 Lisp_Object left = Qunbound;
2070 2071
2071 rect.left = rect.top = 0; 2072 rect.left = rect.top = 0;
2072 rect.right = FRAME_PIXEL_WIDTH (f); 2073 rect.right = FRAME_PIXEL_WIDTH (f);
@@ -2079,13 +2080,41 @@ w32_createwindow (f)
2079 2080
2080 if (!hprevinst) 2081 if (!hprevinst)
2081 { 2082 {
2083 Lisp_Object ifa;
2084
2082 w32_init_class (hinst); 2085 w32_init_class (hinst);
2086
2087 /* Handle the -geometry command line option and the geometry
2088 settings in the registry. They are decoded and put into
2089 initial-frame-alist by w32-win.el:x-handle-geometry. */
2090 ifa = Fsymbol_value (intern ("initial-frame-alist"));
2091 if (CONSP (ifa))
2092 {
2093 Lisp_Object lt = Fassq (Qleft, ifa);
2094 Lisp_Object tp = Fassq (Qtop, ifa);
2095
2096 if (!NILP (lt))
2097 {
2098 lt = XCDR (lt);
2099 if (INTEGERP (lt))
2100 left = lt;
2101 }
2102 if (!NILP (tp))
2103 {
2104 tp = XCDR (tp);
2105 if (INTEGERP (tp))
2106 top = tp;
2107 }
2108 }
2083 } 2109 }
2084 2110
2085 /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero 2111 if (EQ (left, Qunbound) && EQ (top, Qunbound))
2086 for anything that is not a number and is not Qunbound. */ 2112 {
2087 left = w32_get_arg (Qnil, Qleft, "left", "Left", RES_TYPE_NUMBER); 2113 /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero
2088 top = w32_get_arg (Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER); 2114 for anything that is not a number and is not Qunbound. */
2115 left = w32_get_arg (Qnil, Qleft, "left", "Left", RES_TYPE_NUMBER);
2116 top = w32_get_arg (Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER);
2117 }
2089 2118
2090 FRAME_W32_WINDOW (f) = hwnd 2119 FRAME_W32_WINDOW (f) = hwnd
2091 = CreateWindow (EMACS_CLASS, 2120 = CreateWindow (EMACS_CLASS,