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-27T11·31+0800
committerChris Feng <chris.w.feng@gmail.com>2015-09-27T11·43+0800
commit5184f0d7c1b540a6241904528d068dce288a911e (patch)
tree1f7cecd5399eb739293104f8e5dc9c6cab50b5d6 /exwm-randr.el
parentf685de12d464b334ba7efdfe67e989dd63a96fa0 (diff)
Work around subrs that block EXWM; other minor fixes
Some subrs (e.g. x-file-dialog) create X windows and block the execution of
EXWM, so they won't work normally.  This commit partly fixes this issue by
invoking them in a subordinate Emacs instance and trying to fetch the
result back.

* exwm.el (exwm-blocking-subrs): New variable for specify such subrs.
* exwm.el (exwm-enable, exwm--server-name, exwm--server-stop)
  (exwm--server-eval-at): The implementation.

* exwm-core.el:
* exwm-floating.el:
* exwm-layout.el:
* exwm-manage.el:
* exwm-randr.el:
  Evaluate constants at compile-time.

* README.md: Renamed from README.org to make the 'Commentary:' section
  used by GNU ELPA instead.

* exwm.el: Depends on XELB version 0.3.
Diffstat (limited to 'exwm-randr.el')
-rw-r--r--exwm-randr.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/exwm-randr.el b/exwm-randr.el
index fc8477d2aa..26d15dcb7d 100644
--- a/exwm-randr.el
+++ b/exwm-randr.el
@@ -90,10 +90,11 @@
           (xcb:+request exwm--connection
               (make-instance 'xcb:ConfigureWindow
                              :window (frame-parameter frame 'exwm-outer-id)
-                             :value-mask (logior xcb:ConfigWindow:X
-                                                 xcb:ConfigWindow:Y
-                                                 xcb:ConfigWindow:Width
-                                                 xcb:ConfigWindow:Height)
+                             :value-mask (eval-when-compile
+                                           (logior xcb:ConfigWindow:X
+                                                   xcb:ConfigWindow:Y
+                                                   xcb:ConfigWindow:Width
+                                                   xcb:ConfigWindow:Height))
                              :x x :y y :width width :height height))
           (setq workareas (nconc workareas (list x y width height))
                 viewports (nconc viewports (list x y))))))
@@ -133,11 +134,12 @@
             (make-instance 'xcb:randr:SelectInput
                            :window exwm--root
                            :enable xcb:randr:NotifyMask:ScreenChange
-                           ;; :enable (logior
-                           ;;          xcb:randr:NotifyMask:ScreenChange
-                           ;;          xcb:randr:NotifyMask:OutputChange
-                           ;;          xcb:randr:NotifyMask:OutputProperty
-                           ;;          xcb:randr:NotifyMask:CrtcChange)
+                           ;; :enable (eval-when-compile
+                           ;;           (logior
+                           ;;            xcb:randr:NotifyMask:ScreenChange
+                           ;;            xcb:randr:NotifyMask:OutputChange
+                           ;;            xcb:randr:NotifyMask:OutputProperty
+                           ;;            xcb:randr:NotifyMask:CrtcChange))
                            ))
         (xcb:flush exwm--connection)))))