From ff723e73522ef6fda585fb0a1f8935b85ed5730c 2014-08-23 09:51:55 From: Sergey Pashinin Date: 2014-08-23 09:51:55 Subject: [PATCH] restore maximized frame --- diff --git a/src/workgroups-wconfig.el b/src/workgroups-wconfig.el index 94e6ccc371b2fc9597641dbfcf5025f4dc3b1222..26dd5a6be3755eebc447bebac1c15d551f352c28 100644 --- a/src/workgroups-wconfig.el +++ b/src/workgroups-wconfig.el @@ -198,14 +198,15 @@ Runs each time you're switching workgroups." (let ((wg-record-incorrectly-restored-bufs t) (wg-incorrectly-restored-bufs nil) (params (wg-wconfig-parameters wconfig)) - fullscreen wtree) + fullscreen) (wg-barf-on-active-minibuffer) (when wg-restore-scroll-bars (wg-wconfig-restore-scroll-bars wconfig)) - ;; Restore buffers - (wg-restore-window-tree - (wg-scale-wconfig-to-frame wconfig)) + (when (null (wg-current-workgroup t)) + (set-frame-parameter frame 'fullscreen (if (assoc 'fullscreen params) + (cdr (assoc 'fullscreen params)) + nil))) ;; Restore frame position (when (and wg-restore-frame-position @@ -213,6 +214,9 @@ Runs each time you're switching workgroups." (null (wg-current-workgroup t))) (wg-wconfig-restore-frame-position wconfig frame)) + ;; Restore buffers + (wg-restore-window-tree (wg-scale-wconfig-to-frame wconfig)) + (when wg-incorrectly-restored-bufs (message "Unable to restore these buffers: %S\ If you want, restore them manually and try again."