diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2018-09-09T00·00+0000 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2018-09-09T00·00+0000 |
commit | 5903080b6efba91f6809c2a505a1069e46d8c277 (patch) | |
tree | 36eb92497dbc948222f7e89795d480b073c14fdc /exwm-manage.el | |
parent | 05977d05ff7ba60b1686cc726821b279741c7f0e (diff) | |
parent | 6978c1f45c4d72edab2440faf93fb917afe356ec (diff) |
Merge branch 'medranocalvo/restack-after-map' into externals/exwm
Diffstat (limited to 'exwm-manage.el')
-rw-r--r-- | exwm-manage.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/exwm-manage.el b/exwm-manage.el index 81a486c09795..7b28d6876861 100644 --- a/exwm-manage.el +++ b/exwm-manage.el @@ -665,6 +665,22 @@ border-width: %d; sibling: #x%x; stack-mode: %d" (exwm--log "id=#x%x" window) (exwm-manage--unmanage-window window t)))) +(defun exwm-manage--on-MapNotify (data _synthetic) + "Handle MapNotify event." + (let ((obj (make-instance 'xcb:MapNotify))) + (xcb:unmarshal obj data) + (with-slots (window) obj + (when (assoc window exwm--id-buffer-alist) + (exwm--log "id=#x%x" window) + ;; With this we ensure that a "window hierarchy change" happens after + ;; mapping the window, as some servers (XQuartz) do not generate it. + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window window + :value-mask xcb:ConfigWindow:StackMode + :stack-mode xcb:StackMode:Above)) + (xcb:flush exwm--connection))))) + (defun exwm-manage--on-DestroyNotify (data synthetic) "Handle DestroyNotify event." (unless synthetic @@ -692,6 +708,7 @@ border-width: %d; sibling: #x%x; stack-mode: %d" #'exwm-manage--on-ConfigureRequest) (xcb:+event exwm--connection 'xcb:MapRequest #'exwm-manage--on-MapRequest) (xcb:+event exwm--connection 'xcb:UnmapNotify #'exwm-manage--on-UnmapNotify) + (xcb:+event exwm--connection 'xcb:MapNotify #'exwm-manage--on-MapNotify) (xcb:+event exwm--connection 'xcb:DestroyNotify #'exwm-manage--on-DestroyNotify)) |