about summary refs log tree commit diff
path: root/exwm-manage.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2018-11-11T00·00+0000
committerChris Feng <chris.w.feng@gmail.com>2018-11-11T00·00+0000
commitd650159648e88ec4a67c126834cd24fed6e3fc24 (patch)
tree47290bf1d22c9eff60f413206427fa5d9fff672b /exwm-manage.el
parent9dcfff568f8c1205bf57877e3d1d5ebe8466ce8d (diff)
Fix wrong stacking order of tiling X windows
* exwm-manage.el (exwm-manage--on-MapNotify): Avoid restacking tiling
X windows on the top when force triggering hierarchy change events.
Diffstat (limited to 'exwm-manage.el')
-rw-r--r--exwm-manage.el19
1 files changed, 14 insertions, 5 deletions
diff --git a/exwm-manage.el b/exwm-manage.el
index 79c5405fffe8..d7b5c3662ecf 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -674,11 +674,20 @@ border-width: %d; sibling: #x%x; stack-mode: %d"
         (exwm--log "id=#x%x" window)
         ;; With this we ensure that a "window hierarchy change" happens after
         ;; mapping the window, as some servers (XQuartz) do not generate it.
-        (xcb:+request exwm--connection
-            (make-instance 'xcb:ConfigureWindow
-                           :window window
-                           :value-mask xcb:ConfigWindow:StackMode
-                           :stack-mode xcb:StackMode:Above))
+        (with-current-buffer (exwm--id->buffer window)
+          (if exwm--floating-frame
+              (xcb:+request exwm--connection
+                  (make-instance 'xcb:ConfigureWindow
+                                 :window window
+                                 :value-mask xcb:ConfigWindow:StackMode
+                                 :stack-mode xcb:StackMode:Above))
+            (xcb:+request exwm--connection
+                (make-instance 'xcb:ConfigureWindow
+                               :window window
+                               :value-mask (logior xcb:ConfigWindow:Sibling
+                                                   xcb:ConfigWindow:StackMode)
+                               :sibling exwm--guide-window
+                               :stack-mode xcb:StackMode:Above))))
         (xcb:flush exwm--connection)))))
 
 (defun exwm-manage--on-DestroyNotify (data synthetic)