about summary refs log tree commit diff
path: root/exwm-randr.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-09-11T13·00+0800
committerChris Feng <chris.w.feng@gmail.com>2015-09-11T13·00+0800
commit576a676f1f0895bd473d54c2713ee9e2423023e6 (patch)
tree899da238323194f7e2ed1cdb414e4dd6e0a99c69 /exwm-randr.el
parentcfbd9a5a451cf57149215accbecc75ff7b4a8c3d (diff)
Fix with-slots
* exwm-randr.el (exwm-randr--refresh): Could not set the name slot in
  xcb:randr:GetOutputInfo~reply, turn to another variable.
Diffstat (limited to 'exwm-randr.el')
-rw-r--r--exwm-randr.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/exwm-randr.el b/exwm-randr.el
index d14e0974c7ad..fc8477d2aa27 100644
--- a/exwm-randr.el
+++ b/exwm-randr.el
@@ -48,7 +48,7 @@
 
 (defun exwm-randr--refresh ()
   "Refresh workspaces according to the updated RandR info."
-  (let (geometry output-plist default-geometry workareas viewports)
+  (let (output-name geometry output-plist default-geometry workareas viewports)
     ;; Query all outputs
     (with-slots (config-timestamp outputs)
         (xcb:+request-unchecked+reply exwm--connection
@@ -60,11 +60,11 @@
                 (make-instance 'xcb:randr:GetOutputInfo
                                :output output
                                :config-timestamp config-timestamp))
-          (setq name                    ;UTF-8 encoded
+          (setf output-name             ;UTF-8 encoded
                 (decode-coding-string (apply #'unibyte-string name) 'utf-8))
           (if (or (/= connection xcb:randr:Connection:Connected)
                   (= 0 crtc))           ;FIXME
-              (plist-put output-plist name nil)
+              (plist-put output-plist output-name nil)
             (with-slots (x y width height)
                 (xcb:+request-unchecked+reply exwm--connection
                     (make-instance 'xcb:randr:GetCrtcInfo
@@ -73,7 +73,7 @@
               (setq geometry (make-instance 'xcb:RECTANGLE
                                             :x x :y y
                                             :width width :height height)
-                    output-plist (plist-put output-plist name geometry))
+                    output-plist (plist-put output-plist output-name geometry))
               (unless default-geometry ;assume the first output as primary
                 (setq default-geometry geometry)))))))
     (cl-assert (<= 2 (length output-plist)))