diff options
author | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2018-11-03T12·00+0000 |
---|---|---|
committer | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2018-11-03T12·00+0000 |
commit | cd7b32d1c203b87d428ea75e5a5e1452d8236742 (patch) | |
tree | d524c1a28a78a36b0a71f91d65d6e90f3c68e239 /exwm-workspace.el | |
parent | 0dd909a11baf3d7d766c1672d726eb59b1474ef2 (diff) |
Hide minibuffer upon receiving any event
* exwm-input.el (exwm-input--event-hook): New variable. (exwm-input--on-ButtonPress, exwm-input--on-KeyPress): Run `exwm-input--event-hook'. * exwm-workspace.el (exwm-workspace--init, exwm-workspace--exit): Hide minibuffer upon noticing an event.
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r-- | exwm-workspace.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el index 0f0d10c36762..d58758fc1f01 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -128,6 +128,7 @@ Please manually run the hook `exwm-workspace-list-change-hook' afterwards.") (defvar exwm-workspace--workareas nil "Workareas (struts excluded).") (defvar exwm-input--during-command) +(defvar exwm-input--event-hook) (defvar exwm-layout-show-all-buffers) (defvar exwm-manage--desktop) (declare-function exwm-input--on-buffer-list-update "exwm-input.el" ()) @@ -1584,6 +1585,9 @@ applied to all subsequently created X frames." (add-hook 'after-make-frame-functions #'exwm-workspace--on-after-make-frame) (add-hook 'delete-frame-functions #'exwm-workspace--on-delete-frame) + (when (exwm-workspace--minibuffer-own-frame-p) + (add-hook 'exwm-input--event-hook + #'exwm-workspace--on-echo-area-clear)) ;; Switch to the first workspace (exwm-workspace-switch 0 t) ;; Prevent frame parameters introduced by this module from being @@ -1604,6 +1608,9 @@ applied to all subsequently created X frames." #'exwm-workspace--on-after-make-frame) (remove-hook 'delete-frame-functions #'exwm-workspace--on-delete-frame) + (when (exwm-workspace--minibuffer-own-frame-p) + (remove-hook 'exwm-input--event-hook + #'exwm-workspace--on-echo-area-clear)) ;; Hide & reparent out all frames (save-set can't be used here since ;; X windows will be re-mapped). (setq exwm-workspace--current nil) |