]> git.eshelyaron.com Git - emacs.git/commitdiff
* faces.el (x-handle-named-frame-geometry): Ignore errors from
authorChong Yidong <cyd@stupidchicken.com>
Thu, 7 May 2009 00:03:42 +0000 (00:03 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Thu, 7 May 2009 00:03:42 +0000 (00:03 +0000)
x-get-resource due to not yet opened X connection.  This is a
temporary workaround for Bug#3194.

lisp/ChangeLog
lisp/faces.el

index b4e87672e345bc176e83f1baebd28732298aa224..155e7049603ec98bf2a8b234abed2e2ddd940ba9 100644 (file)
@@ -1,3 +1,9 @@
+2009-05-07  Chong Yidong  <cyd@stupidchicken.com>
+
+       * faces.el (x-handle-named-frame-geometry): Ignore errors from
+       x-get-resource due to not yet opened X connection.  This is a
+       temporary workaround for Bug#3194.
+
 2009-05-05  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>  (tiny change)
 
        * vc-svn.el (vc-svn-parse-status): ?D is for removed files (bug#3213).
index 7e4c6d3a29c429998bc68c7d85750c502ce8788c..778a363b17039ac9705f2db7f2b637d616c7e053 100644 (file)
@@ -1924,7 +1924,14 @@ Value is the new parameter list."
   (let* ((name (or (cdr (assq 'name parameters))
                   (cdr (assq 'name default-frame-alist))))
         (x-resource-name name)
-        (res-geometry (if name (x-get-resource "geometry" "Geometry"))))
+        (res-geometry (when name
+                        ;; FIXME: x-get-resource fails if the X
+                        ;; connection is not open, e.g. if we call
+                        ;; make-frame-on-display.  We should detect
+                        ;; this case here, and open the connection.
+                        ;; (Bug#3194).
+                        (ignore-errors
+                          (x-get-resource "geometry" "Geometry")))))
     (when res-geometry
       (let ((parsed (x-parse-geometry res-geometry)))
        ;; If the resource specifies a position, call the position