diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2016-04-21T11·30+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2016-04-21T11·30+0800 |
commit | 367bdf2e1918dd61780e2284a4c89d5ef8cd1254 (patch) | |
tree | 1c54c520c8d915efce9801069d016610a044587f /exwm-manage.el | |
parent | ddbbeda285b3b671ace99f1688e6bd3c3f84c742 (diff) |
Properly place undecorated X windows
* exwm-manage.el (exwm-manage--manage-window): Convert absolute position of undecorated X windows.
Diffstat (limited to 'exwm-manage.el')
-rw-r--r-- | exwm-manage.el | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/exwm-manage.el b/exwm-manage.el index b0657b920c46..187703395cfa 100644 --- a/exwm-manage.el +++ b/exwm-manage.el @@ -126,12 +126,20 @@ corresponding buffer.") exwm-window-type) (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DOCK exwm-window-type)) - (xcb:+request exwm--connection - (make-instance 'xcb:ReparentWindow - :window id - :parent (frame-parameter exwm-workspace--current - 'exwm-workspace) - :x x :y y))) + (let ((frame-geometry (frame-parameter exwm-workspace--current + 'exwm-geometry)) + (workspace (frame-parameter exwm-workspace--current + 'exwm-workspace))) + (when (and frame-geometry + (/= 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 (when (memq xcb:Atom:_NET_WM_WINDOW_TYPE_SPLASH exwm-window-type) (xcb:+request exwm--connection |