about summary refs log tree commit diff
path: root/exwm-workspace.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-08-12T11·18+0800
committerChris Feng <chris.w.feng@gmail.com>2016-08-12T11·18+0800
commitdb5128c1b9f77ecefd62a7150ccbdef33dd870af (patch)
tree6a6078d9d3bdd28e4dab4c28398aa698c408a810 /exwm-workspace.el
parent8e3fc3602f649fca47a61a2be2072521a352a62a (diff)
Fix CreateWindow attributes
; Also fix various compile warnings.

* exwm-floating.el (exwm-floating--set-floating):
* exwm-manage.el (exwm-manage--manage-window):
* exwm-systemtray.el (exwm-systemtray--init):
* exwm-workspace.el (exwm-workspace--add-frame-as-workspace)
(exwm-workspace--init):
* exwm.el (exwm--init-icccm-ewmh):
Explicitly specify the class (InputOutput or InputOnly) and for an
InputOutput X window the background pixmap when creating an X window.
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r--exwm-workspace.el49
1 files changed, 34 insertions, 15 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 977cfe64bbcb..3d3a542eaf6b 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -1171,14 +1171,20 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
           (set-frame-parameter frame param (frame-parameter w param))))
       (xcb:+request exwm--connection
           (make-instance 'xcb:CreateWindow
-                         :depth 0 :wid workspace :parent exwm--root
-                         :x 0 :y 0
+                         :depth 0
+                         :wid workspace
+                         :parent exwm--root
+                         :x 0
+                         :y 0
                          :width (x-display-pixel-width)
                          :height (x-display-pixel-height)
-                         :border-width 0 :class xcb:WindowClass:CopyFromParent
-                         :visual 0      ;CopyFromParent
-                         :value-mask (logior xcb:CW:OverrideRedirect
+                         :border-width 0
+                         :class xcb:WindowClass:InputOutput
+                         :visual 0
+                         :value-mask (logior xcb:CW:BackPixmap
+                                             xcb:CW:OverrideRedirect
                                              xcb:CW:EventMask)
+                         :background-pixmap xcb:BackPixmap:ParentRelative
                          :override-redirect 1
                          :event-mask xcb:EventMask:SubstructureRedirect))
       (xcb:+request exwm--connection
@@ -1188,13 +1194,19 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
                          :stack-mode xcb:StackMode:Below))
       (xcb:+request exwm--connection
           (make-instance 'xcb:CreateWindow
-                         :depth 0 :wid container :parent workspace
-                         :x 0 :y 0
+                         :depth 0
+                         :wid container
+                         :parent workspace
+                         :x 0
+                         :y 0
                          :width (x-display-pixel-width)
                          :height (x-display-pixel-height)
-                         :border-width 0 :class xcb:WindowClass:CopyFromParent
-                         :visual 0      ;CopyFromParent
-                         :value-mask xcb:CW:OverrideRedirect
+                         :border-width 0
+                         :class xcb:WindowClass:InputOutput
+                         :visual 0
+                         :value-mask (logior xcb:CW:BackPixmap
+                                             xcb:CW:OverrideRedirect)
+                         :background-pixmap xcb:BackPixmap:ParentRelative
                          :override-redirect 1))
       (exwm--debug
        (xcb:+request exwm--connection
@@ -1372,12 +1384,19 @@ applied to all subsequently created X frames."
                              container)
         (xcb:+request exwm--connection
             (make-instance 'xcb:CreateWindow
-                           :depth 0 :wid container :parent exwm--root
-                           :x -1 :y -1 :width 1 :height 1
+                           :depth 0
+                           :wid container
+                           :parent exwm--root
+                           :x 0
+                           :y 0
+                           :width 1
+                           :height 1
                            :border-width 0
-                           :class xcb:WindowClass:CopyFromParent
-                           :visual 0        ;CopyFromParent
-                           :value-mask xcb:CW:OverrideRedirect
+                           :class xcb:WindowClass:InputOutput
+                           :visual 0
+                           :value-mask (logior xcb:CW:BackPixmap
+                                               xcb:CW:OverrideRedirect)
+                           :background-pixmap xcb:BackPixmap:ParentRelative
                            :override-redirect 1))
         (exwm--debug
          (xcb:+request exwm--connection