[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm 6978c1f 4/7: Restack X-Windows after being mapped
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm 6978c1f 4/7: Restack X-Windows after being mapped to ensure EnterNotify events fire |
Date: |
Sun, 9 Sep 2018 06:40:00 -0400 (EDT) |
branch: externals/exwm
commit 6978c1f45c4d72edab2440faf93fb917afe356ec
Author: Adrián Medraño Calvo <address@hidden>
Commit: Adrián Medraño Calvo <address@hidden>
Restack X-Windows after being mapped to ensure EnterNotify events fire
* exwm-manage.el (exwm-manage--on-MapNotify, exwm-manage--init):
Restack X windows after being mapped in order to ensure they receive
an EnterNotify event (does not happen under XQuartz).
---
exwm-manage.el | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/exwm-manage.el b/exwm-manage.el
index 81a486c..7b28d68 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))
- [elpa] externals/exwm updated (dd57c5e -> 5903080), Chris Feng, 2018/09/09
- [elpa] externals/exwm 6978c1f 4/7: Restack X-Windows after being mapped to ensure EnterNotify events fire,
Chris Feng <=
- [elpa] externals/exwm ac1372e 3/7: Command for toggling debugging output, Chris Feng, 2018/09/09
- [elpa] externals/exwm 5903080 7/7: Merge branch 'medranocalvo/restack-after-map' into externals/exwm, Chris Feng, 2018/09/09
- [elpa] externals/exwm 3419337 2/7: Substitute overlapping keybindings, Chris Feng, 2018/09/09
- [elpa] externals/exwm 72bba11 5/7: ; Minor fixes for Calvo's patch set., Chris Feng, 2018/09/09
- [elpa] externals/exwm 05977d0 6/7: Merge branch 'medranocalvo/xcb-logging' into externals/exwm, Chris Feng, 2018/09/09
- [elpa] externals/exwm 74ef19f 1/7: Use XELB's debugging facilities, Chris Feng, 2018/09/09