From 960f403e2eb8e5f9db76ad01a0437022865cf814 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Dec 2019 01:49:10 -0500 Subject: [PATCH] Fix misaligned dashboard on workspace switch #2219 Only occurs in daemon GUI frames, for some reason. --- modules/ui/doom-dashboard/config.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 7df29520c..b151f7fed 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -125,6 +125,10 @@ PLIST can have the following properties: ;; `persp-mode' integration: update `default-directory' when switching perspectives (add-hook 'persp-created-functions #'+doom-dashboard--persp-record-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 'doom-init-ui-hook #'+doom-dashboard-init-h)