From 6be75083c2adeb54882061e82597fab4cdf2a4f4 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Fri, 23 Sep 2016 18:41:43 +0800 Subject: 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. --- exwm.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'exwm.el') 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) -- cgit 1.4.1