emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/exwm c2856d15e8: Remove redundant with-current-buffer i


From: ELPA Syncer
Subject: [elpa] externals/exwm c2856d15e8: Remove redundant with-current-buffer in manage-window (#13)
Date: Sun, 4 Feb 2024 15:57:52 -0500 (EST)

branch: externals/exwm
commit c2856d15e8b76e6faec5e2f44a9c80865a39f55a
Author: Steven Allen <steven@stebalien.com>
Commit: GitHub <noreply@github.com>

    Remove redundant with-current-buffer in manage-window (#13)
    
    All this logic runs in the context of the EXWM buffer. If there are
    concerns about the X windows associating with a different buffer while
    we're still trying to manage it, we probably have bigger problems.
    
    * exwm-manage.el (exwm-manage--manage-window): assume that the current
    buffer doesn't change.
---
 exwm-manage.el | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/exwm-manage.el b/exwm-manage.el
index fa73a8f380..c344c4cfb1 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -393,23 +393,19 @@ Override current hinds if FORCE is non-nil."
       (if (plist-get exwm--configurations 'char-mode)
           (exwm-input-release-keyboard id)
         (exwm-input-grab-keyboard id))
-      (let ((simulation-keys (plist-get exwm--configurations 'simulation-keys))
-            (prefix-keys (plist-get exwm--configurations 'prefix-keys)))
-        (with-current-buffer (exwm--id->buffer id)
-          (when simulation-keys
-            (exwm-input-set-local-simulation-keys simulation-keys))
-          (when prefix-keys
-            (setq-local exwm-input-prefix-keys prefix-keys))))
+      (when-let ((simulation-keys (plist-get exwm--configurations 
'simulation-keys)))
+        (exwm-input-set-local-simulation-keys simulation-keys))
+      (when-let ((prefix-keys (plist-get exwm--configurations 'prefix-keys)))
+        (setq-local exwm-input-prefix-keys prefix-keys))
       (setq exwm-workspace--switch-history-outdated t)
       (exwm--update-desktop id)
       (exwm-manage--update-ewmh-state id)
-      (with-current-buffer (exwm--id->buffer id)
-        (when (or (plist-get exwm--configurations 'fullscreen)
-                  (exwm-layout--fullscreen-p))
-          (setq exwm--ewmh-state (delq xcb:Atom:_NET_WM_STATE_FULLSCREEN
-                                       exwm--ewmh-state))
-          (exwm-layout-set-fullscreen id))
-        (run-hooks 'exwm-manage-finish-hook)))))
+      (when (or (plist-get exwm--configurations 'fullscreen)
+                (exwm-layout--fullscreen-p))
+        (setq exwm--ewmh-state (delq xcb:Atom:_NET_WM_STATE_FULLSCREEN
+                                     exwm--ewmh-state))
+        (exwm-layout-set-fullscreen id))
+      (run-hooks 'exwm-manage-finish-hook))))
 
 (defun exwm-manage--unmanage-window (id &optional withdraw-only)
   "Unmanage window ID.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]