Properly place undecorated X windows

* exwm-manage.el (exwm-manage--manage-window): Convert absolute position
of undecorated X windows.
This commit is contained in:
Chris Feng 2016-04-21 19:30:55 +08:00
parent ddbbeda285
commit 367bdf2e19

View file

@ -126,12 +126,20 @@ corresponding buffer.")
exwm-window-type) exwm-window-type)
(memq xcb:Atom:_NET_WM_WINDOW_TYPE_DOCK (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DOCK
exwm-window-type)) exwm-window-type))
(xcb:+request exwm--connection (let ((frame-geometry (frame-parameter exwm-workspace--current
(make-instance 'xcb:ReparentWindow 'exwm-geometry))
:window id (workspace (frame-parameter exwm-workspace--current
:parent (frame-parameter exwm-workspace--current 'exwm-workspace)))
'exwm-workspace) (when (and frame-geometry
:x x :y y))) (/= x 0)
(/= y 0))
(setq x (- x (slot-value frame-geometry 'x))
y (- y (slot-value frame-geometry 'y))))
(xcb:+request exwm--connection
(make-instance 'xcb:ReparentWindow
:window id
:parent workspace
:x x :y y))))
;; Center window of type _NET_WM_WINDOW_TYPE_SPLASH ;; Center window of type _NET_WM_WINDOW_TYPE_SPLASH
(when (memq xcb:Atom:_NET_WM_WINDOW_TYPE_SPLASH exwm-window-type) (when (memq xcb:Atom:_NET_WM_WINDOW_TYPE_SPLASH exwm-window-type)
(xcb:+request exwm--connection (xcb:+request exwm--connection