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:
parent
2597f74c7f
commit
6be75083c2
5 changed files with 66 additions and 36 deletions
19
exwm.el
19
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue