aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32fns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32fns.c')
-rw-r--r--src/w32fns.c58
1 files changed, 41 insertions, 17 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 68fcced88c2..8c6a60d47bf 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,
@@ -6207,7 +6236,7 @@ w32_query_font (struct frame *f, char *fontname)
6207 6236
6208 for (i = 0; i < one_w32_display_info.n_fonts ;i++, pfi++) 6237 for (i = 0; i < one_w32_display_info.n_fonts ;i++, pfi++)
6209 { 6238 {
6210 if (strcmp(pfi->name, fontname) == 0) return pfi; 6239 if (stricmp(pfi->name, fontname) == 0) return pfi;
6211 } 6240 }
6212 6241
6213 return NULL; 6242 return NULL;
@@ -6326,17 +6355,12 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
6326 CHECK_STRING (color); 6355 CHECK_STRING (color);
6327 6356
6328 if (w32_defined_color (f, SDATA (color), &foo, 0)) 6357 if (w32_defined_color (f, SDATA (color), &foo, 0))
6329 { 6358 return list3 (make_number ((GetRValue (foo.pixel) << 8)
6330 Lisp_Object rgb[3]; 6359 | GetRValue (foo.pixel)),
6331 6360 make_number ((GetGValue (foo.pixel) << 8)
6332 rgb[0] = make_number ((GetRValue (foo.pixel) << 8) 6361 | GetGValue (foo.pixel)),
6333 | GetRValue (foo.pixel)); 6362 make_number ((GetBValue (foo.pixel) << 8)
6334 rgb[1] = make_number ((GetGValue (foo.pixel) << 8) 6363 | GetBValue (foo.pixel)));
6335 | GetGValue (foo.pixel));
6336 rgb[2] = make_number ((GetBValue (foo.pixel) << 8)
6337 | GetBValue (foo.pixel));
6338 return Flist (3, rgb);
6339 }
6340 else 6364 else
6341 return Qnil; 6365 return Qnil;
6342} 6366}