[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm d9b4ba0 2/2: Avoid mapping managed X windows on Ma
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm d9b4ba0 2/2: Avoid mapping managed X windows on MapRequest |
Date: |
Thu, 29 Oct 2015 04:24:47 +0000 |
branch: externals/exwm
commit d9b4ba0265fc1674b1205a11e838f86bce434b13
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Avoid mapping managed X windows on MapRequest
* exwm-manage.el (exwm-manage--manage-window, exwm-manage--on-MapRequest):
Check managed X windows in exwm-manage--on-MapRequest instead.
---
exwm-manage.el | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/exwm-manage.el b/exwm-manage.el
index 0eed8b9..bf285ab 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -63,10 +63,6 @@ corresponding buffer.")
"Manage window ID."
(exwm--log "Try to manage #x%x" id)
(catch 'return
- ;; Ensure it's not managed
- (when (assoc id exwm--id-buffer-alist)
- (exwm--log "#x%x is already managed" id)
- (throw 'return 'managed))
;; Ensure it's alive
(when (xcb:+request-checked+request-check exwm--connection
(make-instance 'xcb:ChangeWindowAttributes
@@ -363,12 +359,14 @@ corresponding buffer.")
(let ((obj (make-instance 'xcb:MapRequest)))
(xcb:unmarshal obj data)
(with-slots (parent window) obj
- (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)))))
+ (if (assoc window exwm--id-buffer-alist)
+ (exwm--log "#x%x is already managed" id)
+ (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)
"Handle UnmapNotify event."