[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm 367bdf2 1/3: Properly place undecorated X windows
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm 367bdf2 1/3: Properly place undecorated X windows |
Date: |
Thu, 12 May 2016 16:18:56 +0000 (UTC) |
branch: externals/exwm
commit 367bdf2e1918dd61780e2284a4c89d5ef8cd1254
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Properly place undecorated X windows
* exwm-manage.el (exwm-manage--manage-window): Convert absolute position
of undecorated X windows.
---
exwm-manage.el | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/exwm-manage.el b/exwm-manage.el
index b0657b9..1877033 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