about summary refs log tree commit diff
path: root/exwm.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.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.el')
-rw-r--r--exwm.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/exwm.el b/exwm.el
index cb7fd80aa136..850becfd9eaf 100644
--- a/exwm.el
+++ b/exwm.el
@@ -399,19 +399,20 @@
      ;; _NET_REQUEST_FRAME_EXTENTS
      ((= type xcb:Atom:_NET_REQUEST_FRAME_EXTENTS)
       (let ((buffer (exwm--id->buffer id))
-            left right top btm)
+            top btm)
         (if (or (not buffer)
                 (not (buffer-local-value 'exwm--floating-frame buffer)))
-            (setq left 0 right 0 top 0 btm 0)
-          (setq left exwm-floating-border-width
-                right exwm-floating-border-width
-                top (+ exwm-floating-border-width (window-header-line-height))
-                btm (+ exwm-floating-border-width
-                       (window-mode-line-height))))
+            (setq top 0
+                  btm 0)
+          (setq top (window-header-line-height)
+                btm (window-mode-line-height)))
         (xcb:+request exwm--connection
             (make-instance 'xcb:ewmh:set-_NET_FRAME_EXTENTS
-                           :window id :left left :right right
-                           :top top :bottom btm)))
+                           :window id
+                           :left 0
+                           :right 0
+                           :top top
+                           :bottom btm)))
       (xcb:flush exwm--connection))
      ;; _NET_WM_DESKTOP.
      ((= type xcb:Atom:_NET_WM_DESKTOP)