about summary refs log tree commit diff
path: root/exwm-layout.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-09-23T10·41+0800
committerChris Feng <chris.w.feng@gmail.com>2016-09-23T10·41+0800
commit6be75083c2adeb54882061e82597fab4cdf2a4f4 (patch)
tree74293125fc05cdf53ac7202f490f01d003ae760b /exwm-layout.el
parent2597f74c7fb9ad290a45c89d0025bebcf739a976 (diff)
Use X window borders
; This commit replaces the internal borders of Emacs frames with X
; window borders.  This should make the flickering issue of floating X
; windows less serious.

* exwm-floating.el (exwm-floating--border-pixel)
(exwm-floating--border-colormap): New variables for storing border pixel
and its colormap.
(exwm-floating--set-floating): Do not set the internal border (and
background color) of floating frames; do not take
`exwm-floating-border-width' into account when calculating geometries;
set the border of floating X window containers.
(exwm-floating--unset-floating): No need to restore the position of X
windows any more; hide the border of floating X window containers.
(exwm-floating--init): Initialize the border pixel.
* exwm-layout.el (exwm-layout-set-fullscreen)
(exwm-layout-unset-fullscreen): Show/Hide container border respectively.
* exwm-manage.el (exwm-manage--manage-window): Set the border pixel and
colormap of X window containers.
* exwm-workspace.el (exwm-workspace-move-window): Do not set the
internal border and background color of floating frames.
* exwm.el (exwm--on-ClientMessage): Simplify the code for calculating
_NET_REQUEST_FRAME_EXTENTS.
Diffstat (limited to 'exwm-layout.el')
-rw-r--r--exwm-layout.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/exwm-layout.el b/exwm-layout.el
index 5a31c947c1bb..79728bb7c49d 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -214,7 +214,9 @@
     (xcb:+request exwm--connection
         (make-instance 'xcb:ConfigureWindow
                        :window exwm--container
-                       :value-mask xcb:ConfigWindow:StackMode
+                       :value-mask (logior xcb:ConfigWindow:BorderWidth
+                                           xcb:ConfigWindow:StackMode)
+                       :border-width 0
                        :stack-mode xcb:StackMode:Above))
     (xcb:+request exwm--connection
         (make-instance 'xcb:ewmh:set-_NET_WM_STATE
@@ -240,9 +242,11 @@
                            :window exwm--container
                            :value-mask (eval-when-compile
                                          (logior xcb:ConfigWindow:X
-                                                 xcb:ConfigWindow:Y))
+                                                 xcb:ConfigWindow:Y
+                                                 xcb:ConfigWindow:BorderWidth))
                            :x (elt exwm--floating-frame-position 0)
-                           :y (elt exwm--floating-frame-position 1)))
+                           :y (elt exwm--floating-frame-position 1)
+                           :border-width exwm-floating-border-width))
       ;; Put the X window just above the Emacs frame.
       (xcb:+request exwm--connection
           (make-instance 'xcb:ConfigureWindow