about summary refs log tree commit diff
path: root/exwm-manage.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-09-09T03·26+0800
committerChris Feng <chris.w.feng@gmail.com>2015-09-09T03·26+0800
commit5373c1df1a8432f6a54e8ded8c9a145842c067e2 (patch)
tree16bc7e1e40bcbe2b1f058514f1a6b10dd12d48d9 /exwm-manage.el
parenteafd031c556ecfe986c656ca72fcde7e06ac819a (diff)
Add support for xcb:Atom:_NET_CLIENT_LIST_STACKING etc
The _NET_CLIENT_LIST_STACKING EWMH property is essential for e.g. the tabbar of
chromium to work correctly.

* exwm-input.el: Remove invalid TODO item.
* exwm.el (exwm--init-icccm-ewmh): Add xcb:Atom:_NET_CLIENT_LIST and
  xcb:Atom:_NET_CLIENT_LIST_STACKING to _NET_SUPPORTED.
* exwm-layout.el (exwm-layout--refresh): Update _NET_CLIENT_LIST_STACKING.
* exwm-manage.el (exwm-manage--manage-window, exwm-manage--unmanage-window):
  Update _NET_CLIENT_LIST.
Diffstat (limited to 'exwm-manage.el')
-rw-r--r--exwm-manage.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/exwm-manage.el b/exwm-manage.el
index a8d0e592a8..2636c016b8 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -128,6 +128,10 @@ corresponding buffer.")
                          :cursor xcb:Cursor:None
                          :button xcb:ButtonIndex:Any
                          :modifiers xcb:ModMask:Any))
+      (xcb:+request exwm--connection    ;update _NET_CLIENT_LIST
+          (make-instance 'xcb:ewmh:set-_NET_CLIENT_LIST
+                         :window exwm--root
+                         :data (vconcat (mapcar #'car exwm--id-buffer-alist))))
       (xcb:flush exwm--connection)
       (exwm--update-title id)
       (exwm--update-transient-for id)
@@ -150,6 +154,11 @@ corresponding buffer.")
   (let ((buffer (exwm--id->buffer id)))
     (exwm--log "Unmanage #x%x (buffer: %s)" id buffer)
     (setq exwm--id-buffer-alist (assq-delete-all id exwm--id-buffer-alist))
+    (xcb:+request exwm--connection      ;update _NET_CLIENT_LIST
+        (make-instance 'xcb:ewmh:set-_NET_CLIENT_LIST
+                       :window exwm--root
+                       :data (vconcat (mapcar #'car exwm--id-buffer-alist))))
+    (xcb:flush exwm--connection)
     (when (buffer-live-p buffer)
       (with-current-buffer buffer
         (exwm-workspace--update-switch-history)