mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-27 14:57:59 +01:00
Properly place undecorated X windows
* exwm-manage.el (exwm-manage--manage-window): Convert absolute position of undecorated X windows.
This commit is contained in:
parent
ddbbeda285
commit
367bdf2e19
1 changed files with 14 additions and 6 deletions
|
@ -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))
|
||||||
|
(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
|
(xcb:+request exwm--connection
|
||||||
(make-instance 'xcb:ReparentWindow
|
(make-instance 'xcb:ReparentWindow
|
||||||
:window id
|
:window id
|
||||||
:parent (frame-parameter exwm-workspace--current
|
:parent workspace
|
||||||
'exwm-workspace)
|
:x x :y y))))
|
||||||
: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
|
||||||
|
|
Loading…
Reference in a new issue