about summary refs log tree commit diff
path: root/exwm-systemtray.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2017-08-30T17·00+0800
committerChris Feng <chris.w.feng@gmail.com>2017-08-30T17·00+0800
commit7bc4ea5a6ee1d6d2948e8ba7e065be8ac33b8a47 (patch)
treea9723acac26b4b4057582f7bccdc8dd703f8c35a /exwm-systemtray.el
parent46dfaeb0310e4a331ffe5d19c0774c64e786ff27 (diff)
Update systemtray when initializing
* exwm-systemtray.el (exwm-systemtray--init): Systemtray is not placed
correctly when there's a panel launched before EXWM.
Diffstat (limited to 'exwm-systemtray.el')
-rw-r--r--exwm-systemtray.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/exwm-systemtray.el b/exwm-systemtray.el
index 82a2ccdbf24d..48bd8eacb10a 100644
--- a/exwm-systemtray.el
+++ b/exwm-systemtray.el
@@ -472,7 +472,10 @@ You shall use the default value if using auto-hide minibuffer.")
   (add-hook 'exwm-workspace--update-workareas-hook
             #'exwm-systemtray--on-struts-update)
   (when (boundp 'exwm-randr-refresh-hook)
-    (add-hook 'exwm-randr-refresh-hook #'exwm-systemtray--on-randr-refresh)))
+    (add-hook 'exwm-randr-refresh-hook #'exwm-systemtray--on-randr-refresh))
+  ;; The struts can be updated already.
+  (when exwm-workspace--workareas
+    (exwm-systemtray--on-struts-update)))
 
 (defun exwm-systemtray--exit ()
   "Exit the systemtray module."