mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-27 13:07:59 +01:00
Only manage windows mapped as the direct children of root window (close #38)
Sometimes Emacs create child windows of virtual roots. This commit ensures EXWM will not manage them.
This commit is contained in:
parent
5882015eb5
commit
5210e13e7c
1 changed files with 8 additions and 3 deletions
|
@ -278,7 +278,7 @@ corresponding buffer.")
|
||||||
value-mask)
|
value-mask)
|
||||||
obj
|
obj
|
||||||
(exwm--log "ConfigureRequest from #x%x (#x%x) @%dx%d%+d%+d, border: %d"
|
(exwm--log "ConfigureRequest from #x%x (#x%x) @%dx%d%+d%+d, border: %d"
|
||||||
value-mask window width height x y border-width)
|
window value-mask width height x y border-width)
|
||||||
(if (setq buffer (exwm--id->buffer window))
|
(if (setq buffer (exwm--id->buffer window))
|
||||||
;; Send client message for managed windows
|
;; Send client message for managed windows
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
|
@ -320,8 +320,13 @@ corresponding buffer.")
|
||||||
"Handle MapRequest event."
|
"Handle MapRequest event."
|
||||||
(let ((obj (make-instance 'xcb:MapRequest)))
|
(let ((obj (make-instance 'xcb:MapRequest)))
|
||||||
(xcb:unmarshal obj data)
|
(xcb:unmarshal obj data)
|
||||||
(exwm--log "MapRequest from #x%x" (slot-value obj 'window))
|
(with-slots (parent window) obj
|
||||||
(exwm-manage--manage-window (slot-value obj 'window))))
|
(if (/= exwm--root parent)
|
||||||
|
(progn (xcb:+request exwm--connection
|
||||||
|
(make-instance xcb:MapWindow :window window))
|
||||||
|
(xcb:flush exwm--connection))
|
||||||
|
(exwm--log "MapRequest from #x%x" window)
|
||||||
|
(exwm-manage--manage-window window)))))
|
||||||
|
|
||||||
(defun exwm-manage--on-UnmapNotify (data synthetic)
|
(defun exwm-manage--on-UnmapNotify (data synthetic)
|
||||||
"Handle UnmapNotify event."
|
"Handle UnmapNotify event."
|
||||||
|
|
Loading…
Reference in a new issue