From c6ad2b638e0b3340b11561beb8f6c49a2604e693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Medra=C3=B1o=20Calvo?= Date: Wed, 15 Apr 2020 00:00:00 +0000 Subject: [PATCH] refactor(3p/exwm): Remove `exwm-input--skip-buffer-list-update' * exwm-input.el: (exwm-input--on-buffer-list-update): Stop checking `exwm-input--skip-buffer-list-update'; it's no longer needed now that we keep track of the last selected window and buffer. (exwm-input--skip-buffer-list-update): Remove variable. * exwm-manage.el (exwm-manage--manage-window): Remove binding of `exwm-input--skip-buffer-list-update'. Imported from https://github.com/ch11ng/exwm/pull/737 Change-Id: Iacbdb8b607a82352e5b55509b0aba93f1d87a9f2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3562 Tested-by: BuildkiteCI Reviewed-by: tazjin --- third_party/exwm/exwm-input.el | 4 ---- third_party/exwm/exwm-manage.el | 7 ++----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/third_party/exwm/exwm-input.el b/third_party/exwm/exwm-input.el index 1120e81eb..6506597cf 100644 --- a/third_party/exwm/exwm-input.el +++ b/third_party/exwm/exwm-input.el @@ -117,9 +117,6 @@ defined in `exwm-mode-map' here." (defvar exwm-input--simulation-keys nil "Simulation keys in line-mode.") -(defvar exwm-input--skip-buffer-list-update nil - "Skip the upcoming 'buffer-list-update'.") - (defvar exwm-input--temp-line-mode nil "Non-nil indicates it's in temporary line-mode for char-mode.") @@ -315,7 +312,6 @@ ARGS are additional arguments to CALLBACK." (let* ((win (selected-window)) (buf (window-buffer win))) (when (and (not (exwm-workspace--client-p)) - (not exwm-input--skip-buffer-list-update) (not (and (eq exwm-input--update-focus-window win) (eq exwm-input--update-focus-window-buffer buf)))) (exwm--log "selected-window=%S current-buffer=%S" win buf) diff --git a/third_party/exwm/exwm-manage.el b/third_party/exwm/exwm-manage.el index a7866f1ef..0664c09b7 100644 --- a/third_party/exwm/exwm-manage.el +++ b/third_party/exwm/exwm-manage.el @@ -151,7 +151,6 @@ want to match against EXWM internal variables such as `exwm-title', (defvar exwm-manage--ping-lock nil "Non-nil indicates EXWM is pinging a window.") -(defvar exwm-input--skip-buffer-list-update) (defvar exwm-input-prefix-keys) (defvar exwm-workspace--current) (defvar exwm-workspace--id-struts-alist) @@ -263,8 +262,7 @@ want to match against EXWM internal variables such as `exwm-title', (make-instance 'xcb:ChangeSaveSet :mode xcb:SetMode:Insert :window id)) - (with-current-buffer (let ((exwm-input--skip-buffer-list-update t)) - (generate-new-buffer "*EXWM*")) + (with-current-buffer (generate-new-buffer "*EXWM*") ;; Keep the oldest X window first. (setq exwm--id-buffer-alist (nconc exwm--id-buffer-alist `((,id . ,(current-buffer))))) @@ -349,8 +347,7 @@ want to match against EXWM internal variables such as `exwm-title', :stack-mode xcb:StackMode:Below))) (xcb:flush exwm--connection) (setq exwm--id-buffer-alist (assq-delete-all id exwm--id-buffer-alist)) - (let ((kill-buffer-query-functions nil) - (exwm-input--skip-buffer-list-update t)) + (let ((kill-buffer-query-functions nil)) (kill-buffer (current-buffer))) (throw 'return 'ignored)) (let ((index (plist-get exwm--configurations 'workspace)))