about summary refs log tree commit diff
path: root/third_party/exwm/exwm-workspace.el
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-12-08T19·16+0300
committerVincent Ambo <mail@tazj.in>2021-12-08T19·17+0300
commit57b37cdc83bdebf2c2e2bcc0c01facc63c29c941 (patch)
tree899e0b6b4b81ca3932e4d2436156e731a53ee126 /third_party/exwm/exwm-workspace.el
parent14bf3f3cd98bfd766d011c22d45b9d74d84c7da7 (diff)
parent10bd12234e896d35a2c4eafabc62a31126d23bf3 (diff)
subtree(3p/exwm): Update to upstream '10bd1223'
A lot has happened in the meantime (EXWM maintainer change) and this
pulls in all the relevant changes since then.

It may become unnecessary to keep EXWM subtreed, but we'll get to that
later.

Change-Id: I45cc06d747d84b3d28fd0db0e4bb3b749a956583
Diffstat (limited to 'third_party/exwm/exwm-workspace.el')
-rw-r--r--third_party/exwm/exwm-workspace.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/third_party/exwm/exwm-workspace.el b/third_party/exwm/exwm-workspace.el
index c1de5da9a391..c513347119a2 100644
--- a/third_party/exwm/exwm-workspace.el
+++ b/third_party/exwm/exwm-workspace.el
@@ -1,6 +1,6 @@
 ;;; exwm-workspace.el --- Workspace Module for EXWM  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
+;; Copyright (C) 1015-2021 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng <chris.w.feng@gmail.com>
 
@@ -165,18 +165,20 @@ NIL if FRAME is not a workspace"
   "Return t if FRAME is a workspace."
   (memq frame exwm-workspace--list))
 
-(defvar exwm--client-p-hash-table
-  (make-hash-table :test 'eq :weakness 'key))
+(defvar exwm-workspace--client-p-hash-table
+  (make-hash-table :test 'eq :weakness 'key)
+  "Used to cache the results of calling ‘exwm-workspace--client-p’.")
 
 (defsubst exwm-workspace--client-p (&optional frame)
   "Return non-nil if FRAME is an emacsclient frame."
   (let* ((frame (or frame (selected-frame)))
-         (cached-value (gethash frame exwm--client-p-hash-table 'absent)))
+         (cached-value
+          (gethash frame exwm-workspace--client-p-hash-table 'absent)))
     (if (eq cached-value 'absent)
         (puthash frame
                  (or (frame-parameter frame 'client)
                      (not (display-graphic-p frame)))
-                 exwm--client-p-hash-table)
+                 exwm-workspace--client-p-hash-table)
         cached-value)))
 
 (defvar exwm-workspace--switch-map nil
@@ -1467,7 +1469,8 @@ the next workspace."
       ;; care of converting a workspace into a regular unmanaged frame.
       (let ((exwm-workspace--create-silently t))
         (make-frame)))
-    (exwm-workspace--remove-frame-as-workspace frame))))
+    (exwm-workspace--remove-frame-as-workspace frame)
+    (remhash frame exwm-workspace--client-p-hash-table))))
 
 (defun exwm-workspace--on-after-make-frame (frame)
   "Hook run upon `make-frame' that configures FRAME as a workspace."