--- icewm-1.0.9.2/doc/icewm.sgml	Tue Oct  9 16:54:02 2001
+++ icewm-1.0.9.2-jasper/doc/icewm.sgml	Sat Jan 19 21:58:22 2002
@@ -513,6 +513,10 @@
 
 You can also use the numbers from <tt/WinMgr.h/.
 
+<tag/geometry/ Default geometry for window. This geometry should be
+specified in the X11-syntax, formal notation:
+[=][&lt;width&gt;{xX}lt;height&gt;][{+-}&lt;xoffset&gt;{+-}&lt;yoffset&gt;]
+
 <tag/tray/ Default tray option for the window. Affects both the tray and the
 task pane. Tray can be one of the following strings:
 
--- icewm-1.0.9.2/src/wmframe.cc	Tue Oct  9 16:54:04 2001
+++ icewm-1.0.9.2-jasper/src/wmframe.cc	Sat Jan 19 22:46:38 2002
@@ -1761,6 +1761,16 @@
 
     if (!h) return;
 
+    wo = list->getWindowOption(0, false, remove);
+    if (wo) WindowOptions::combineOptions(opt, *wo);
+    if (h->res_class) {
+        wo = list->getWindowOption(h->res_class, false, remove);
+        if (wo) WindowOptions::combineOptions(opt, *wo);
+    }
+    if (h->res_name) {
+        wo = list->getWindowOption(h->res_name, false, remove);
+        if (wo) WindowOptions::combineOptions(opt, *wo);
+    }
     if (h->res_name && h->res_class) {
         char *both = new char[strlen(h->res_name) + 1 +
                               strlen(h->res_class) + 1];
@@ -1773,16 +1783,6 @@
         if (wo) WindowOptions::combineOptions(opt, *wo);
         delete[] both;
     }
-    if (h->res_class) {
-        wo = list->getWindowOption(h->res_class, false, remove);
-        if (wo) WindowOptions::combineOptions(opt, *wo);
-    }
-    if (h->res_name) {
-        wo = list->getWindowOption(h->res_name, false, remove);
-        if (wo) WindowOptions::combineOptions(opt, *wo);
-    }
-    wo = list->getWindowOption(0, false, remove);
-    if (wo) WindowOptions::combineOptions(opt, *wo);
 }
 #endif
 
--- icewm-1.0.9.2/src/wmoption.cc	Tue Oct  9 16:54:04 2001
+++ icewm-1.0.9.2-jasper/src/wmoption.cc	Sat Jan 19 23:07:04 2002
@@ -113,14 +113,18 @@
 
         //msg("parsing %s", arg);
         if ((op->gflags = XParseGeometry(arg, &rx, &ry, &rw, &rh)) != 0) {
-            if (op->gflags & XNegative)
-                rx = desktop->width() - rx;
-            if (op->gflags & YNegative)
-                ry = desktop->height() - ry;
-            op->gx = rx;
-            op->gy = ry;
-            op->gw = rw;
-            op->gh = rh;
+            if ((op->gflags & XValue) && (op->gflags & YValue)) {
+                if (op->gflags & XNegative)
+                     rx = desktop->width() + rx;
+                if (op->gflags & YNegative)
+                     ry = desktop->height() + ry;
+                op->gx = rx;
+                op->gy = ry;
+            }
+            if ((op->gflags & WidthValue) && (op->gflags & HeightValue)) {
+                op->gw = rw;
+                op->gh = rh;
+            }
             //msg("parsed %d %d %d %d %d", rx, ry, rw, rh, op->gflags);
         }
     } else if (strcmp(opt, "layer") == 0) {
@@ -258,7 +262,7 @@
     if (n.gflags & WidthValue)
         cm.gw = n.gw;
     if (n.gflags & HeightValue)
-        cm.gw = n.gw;
+        cm.gh = n.gh;
     cm.gflags |= n.gflags;
 }
 
