summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2022-12-27 09:12:42 -0500
committerAmin Bandali <bandali@gnu.org>2022-12-27 09:12:42 -0500
commit53edeec7b6f8ba41c6040f0d849f8b4114f4628c (patch)
tree63419934a0e8b1ce1c0f53b01938e7b3a916adf4
parenta567a3276f8d953c60b2ad9a25a6509a90f61034 (diff)
downloadconfigs-53edeec7b6f8ba41c6040f0d849f8b4114f4628c.tar.gz
configs-53edeec7b6f8ba41c6040f0d849f8b4114f4628c.tar.xz
configs-53edeec7b6f8ba41c6040f0d849f8b4114f4628c.zip
Prevent bad interaction between EXWM and winner-mode
-rw-r--r--.emacs.d/init.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index e23653b..7b81064 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -216,7 +216,19 @@
(run-with-idle-timer 0.5 nil #'require 'winner)
(with-eval-after-load 'winner
- (winner-mode 1))
+ (winner-mode 1)
+ (when (featurep 'exwm)
+ ;; prevent a bad interaction between EXWM and winner-mode, where
+ ;; sometimes closing a window (like closing a terminal after
+ ;; entering a GPG password via pinentry-gnome3's floating window)
+ ;; results in a dead frame somewhere and effectively freezes EXWM.
+ (advice-add
+ 'winner-insert-if-new
+ :around
+ (lambda (orig-fun &rest args)
+ ;; only add the frame if it's live
+ (when (frame-live-p (car args))
+ (apply orig-fun args))))))
(run-with-idle-timer 0.5 nil #'require 'windmove)
(with-eval-after-load 'windmove