]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/frameset.el: Workaround bug#16793.
authorJuanma Barranquero <lekktu@gmail.com>
Tue, 18 Feb 2014 17:33:37 +0000 (18:33 +0100)
committerJuanma Barranquero <lekktu@gmail.com>
Tue, 18 Feb 2014 17:33:37 +0000 (18:33 +0100)
lisp/frameset.el (frameset--restore-frame): When a frame is being reused
and its root window is not alive, delete all the frame's windows before
restoring the window state.

lisp/ChangeLog
lisp/frameset.el

index 155063592b6fe4921342d4dfcc2799fa4726abfc..e797663b70a80237e7ccb40bf7b27686942e8b80 100644 (file)
@@ -1,3 +1,9 @@
+2014-02-18  Juanma Barranquero  <lekktu@gmail.com>
+
+       * frameset.el (frameset--restore-frame): When a frame is being reused
+       and its root window is not alive, delete all the frame's windows before
+       restoring the window state.  This works around the issue in bug#16793.
+
 2014-02-18  Glenn Morris  <rgm@gnu.org>
 
        * textmodes/remember.el (remember-data-directory)
index 977cc8433d4acdbbbde8f03ee9a211b726972be8..f0b3c79f7768414fc002ee83f1a5c7429128e339 100644 (file)
@@ -932,7 +932,11 @@ is the parameter alist of the frame being restored.  Internal use only."
           (setq frame (frameset--find-frame-if nil display))))
     ;; If found, remove from the list.
     (when frame
-      (setq frameset--reuse-list (delq frame frameset--reuse-list)))
+      (setq frameset--reuse-list (delq frame frameset--reuse-list))
+      ;; Workaround for feature/bug#16793
+      (let ((root (frame-root-window frame)))
+       (unless (window-live-p root)
+         (delete-other-windows-internal (frame-first-window root) root))))
     frame))
 
 (defun frameset--initial-params (parameters)