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.
This commit is contained in:
Chris Feng 2016-09-23 18:41:43 +08:00
parent 2597f74c7f
commit 6be75083c2
5 changed files with 66 additions and 36 deletions

View file

@ -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