diff options
| author | Juanma Barranquero | 2013-07-21 04:42:11 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2013-07-21 04:42:11 +0200 |
| commit | 728dc3cc6093d56809c4159bb8022dbd1eb57d8a (patch) | |
| tree | 6ff3be6d8b4ff0dc2d504fac5c2eb431a385bea8 | |
| parent | d828e5f94255c799cf7ecb4bbe5cbc00828fbfdb (diff) | |
| download | emacs-728dc3cc6093d56809c4159bb8022dbd1eb57d8a.tar.gz emacs-728dc3cc6093d56809c4159bb8022dbd1eb57d8a.zip | |
lisp/desktop.el: Correctly restore iconified frames.
(desktop--filter-iconified-position): New function.
(desktop-filter-parameters-alist): Add entries for `top' and `left'.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/desktop.el | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95b4a2a2b6f..720e040fbff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-07-21 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * desktop.el: Correctly restore iconified frames. | ||
| 4 | (desktop--filter-iconified-position): New function. | ||
| 5 | (desktop-filter-parameters-alist): Add entries for `top' and `left'. | ||
| 6 | |||
| 1 | 2013-07-20 Glenn Morris <rgm@gnu.org> | 7 | 2013-07-20 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * progmodes/gdb-mi.el (gdb-delete-handler, gdb-stopped): | 9 | * 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." | |||
| 896 | (foreground-color . desktop--filter-*-color) | 896 | (foreground-color . desktop--filter-*-color) |
| 897 | (fullscreen . desktop--filter-save-desktop-parm) | 897 | (fullscreen . desktop--filter-save-desktop-parm) |
| 898 | (height . desktop--filter-save-desktop-parm) | 898 | (height . desktop--filter-save-desktop-parm) |
| 899 | (left . desktop--filter-iconified-position) | ||
| 899 | (minibuffer . desktop--filter-minibuffer) | 900 | (minibuffer . desktop--filter-minibuffer) |
| 900 | (name . t) | 901 | (name . t) |
| 901 | (outer-window-id . t) | 902 | (outer-window-id . t) |
| 902 | (parent-id . t) | 903 | (parent-id . t) |
| 904 | (top . desktop--filter-iconified-position) | ||
| 903 | (tty . desktop--filter-tty*) | 905 | (tty . desktop--filter-tty*) |
| 904 | (tty-type . desktop--filter-tty*) | 906 | (tty-type . desktop--filter-tty*) |
| 905 | (width . desktop--filter-save-desktop-parm) | 907 | (width . desktop--filter-save-desktop-parm) |
| @@ -1004,6 +1006,11 @@ Only meaningful when called from a filtering function in | |||
| 1004 | (cons (car current) val)))) | 1006 | (cons (car current) val)))) |
| 1005 | (t t))) | 1007 | (t t))) |
| 1006 | 1008 | ||
| 1009 | (defun desktop--filter-iconified-position (_current parameters saving) | ||
| 1010 | ;; When saving an iconified frame, top & left are meaningless, | ||
| 1011 | ;; so remove them to allow restoring to a default position. | ||
| 1012 | (not (and saving (eq (cdr (assq 'visibility parameters)) 'icon)))) | ||
| 1013 | |||
| 1007 | (defun desktop-restore-in-original-display-p () | 1014 | (defun desktop-restore-in-original-display-p () |
| 1008 | "True if saved frames' displays should be honored." | 1015 | "True if saved frames' displays should be honored." |
| 1009 | (cond ((daemonp) t) | 1016 | (cond ((daemonp) t) |