Fix misaligned dashboard on workspace switch #2219

Only occurs in daemon GUI frames, for some reason.
This commit is contained in:
Henrik Lissner 2019-12-21 01:49:10 -05:00
parent 4741e322df
commit 960f403e2e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -125,6 +125,10 @@ PLIST can have the following properties:
;; `persp-mode' integration: update `default-directory' when switching perspectives ;; `persp-mode' integration: update `default-directory' when switching perspectives
(add-hook 'persp-created-functions #'+doom-dashboard--persp-record-project-h) (add-hook 'persp-created-functions #'+doom-dashboard--persp-record-project-h)
(add-hook 'persp-activated-functions #'+doom-dashboard--persp-detect-project-h) (add-hook 'persp-activated-functions #'+doom-dashboard--persp-detect-project-h)
;; HACK Fix #2219 where, in GUI daemon frames, the dashboard loses center
;; alignment after switching (or killing) workspaces.
(when (daemonp)
(add-hook 'persp-activated-functions #'+doom-dashboard-reload-maybe-h))
(add-hook 'persp-before-switch-functions #'+doom-dashboard--persp-record-project-h))) (add-hook 'persp-before-switch-functions #'+doom-dashboard--persp-record-project-h)))
(add-hook 'doom-init-ui-hook #'+doom-dashboard-init-h) (add-hook 'doom-init-ui-hook #'+doom-dashboard-init-h)