From 728dc3cc6093d56809c4159bb8022dbd1eb57d8a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 21 Jul 2013 04:42:11 +0200 Subject: [PATCH] lisp/desktop.el: Correctly restore iconified frames. (desktop--filter-iconified-position): New function. (desktop-filter-parameters-alist): Add entries for `top' and `left'. --- lisp/ChangeLog | 6 ++++++ lisp/desktop.el | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95b4a2a2b6f..720e040fbff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-07-21 Juanma Barranquero + + * desktop.el: Correctly restore iconified frames. + (desktop--filter-iconified-position): New function. + (desktop-filter-parameters-alist): Add entries for `top' and `left'. + 2013-07-20 Glenn Morris * progmodes/gdb-mi.el (gdb-delete-handler, gdb-stopped): diff --git a/lisp/desktop.el b/lisp/desktop.el index c31cbead2b9..8d84356fb21 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -896,10 +896,12 @@ DIRNAME must be the directory in which the desktop file will be saved." (foreground-color . desktop--filter-*-color) (fullscreen . desktop--filter-save-desktop-parm) (height . desktop--filter-save-desktop-parm) + (left . desktop--filter-iconified-position) (minibuffer . desktop--filter-minibuffer) (name . t) (outer-window-id . t) (parent-id . t) + (top . desktop--filter-iconified-position) (tty . desktop--filter-tty*) (tty-type . desktop--filter-tty*) (width . desktop--filter-save-desktop-parm) @@ -1004,6 +1006,11 @@ Only meaningful when called from a filtering function in (cons (car current) val)))) (t t))) +(defun desktop--filter-iconified-position (_current parameters saving) + ;; When saving an iconified frame, top & left are meaningless, + ;; so remove them to allow restoring to a default position. + (not (and saving (eq (cdr (assq 'visibility parameters)) 'icon)))) + (defun desktop-restore-in-original-display-p () "True if saved frames' displays should be honored." (cond ((daemonp) t) -- 2.11.4.GIT