about summary refs log tree commit diff
path: root/exwm-floating.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-10-28T06·04+0800
committerChris Feng <chris.w.feng@gmail.com>2015-10-28T06·05+0800
commit2779d2e418bb07adf0408dc8fdaa0fb6e88bf13a (patch)
tree50f3bf56760338d004c3242e762b8c18fc02ba29 /exwm-floating.el
parent11cc84d77e83b81fce8d3032df29d798546648e7 (diff)
Make the creation/destruction of floating frames more silent
* exwm-floating.el (exwm-floating--set-floating): Reparent floating frames
  as late as possible.
* exwm-manage.el (exwm-manage--unmanage-window): Hide floating frames first
  on unmanagement.
Diffstat (limited to 'exwm-floating.el')
-rw-r--r--exwm-floating.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/exwm-floating.el b/exwm-floating.el
index 408cf372dcbf..8fbb2bc26ce1 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -31,7 +31,7 @@
 (eval-when-compile (require 'exwm-workspace))
 
 (defvar exwm-floating-border-width 1 "Border width of the floating window.")
-(defvar exwm-floating-border-color "blue"
+(defvar exwm-floating-border-color "navy"
   "Border color of the floating window.")
 
 (defvar exwm-floating-setup-hook nil
@@ -79,6 +79,8 @@
                        `((minibuffer . nil) ;use the one on workspace
                          (background-color . ,exwm-floating-border-color)
                          (internal-border-width . ,exwm-floating-border-width)
+                         (left . 10000)
+                         (top . 10000)
                          (unsplittable . t))) ;and fix the size later
                     (exwm--unlock))))
          (frame-id (string-to-number (frame-parameter frame 'window-id)))
@@ -155,12 +157,6 @@
         (make-instance 'xcb:ChangeWindowAttributes
                        :window frame-id :value-mask xcb:CW:EventMask
                        :event-mask xcb:EventMask:SubstructureRedirect))
-    ;; Reparent this frame to the original one
-    (xcb:+request exwm--connection
-        (make-instance 'xcb:ReparentWindow
-                       :window outer-id :parent original-id
-                       :x (- x exwm-floating-border-width)
-                       :y (- y exwm-floating-border-width)))
     ;; Save the geometry
     ;; Rationale: the frame will not be ready for some time, thus we cannot
     ;;            infer the correct window size from its geometry.
@@ -182,6 +178,12 @@
         (make-instance 'xcb:ChangeWindowAttributes
                        :window id :value-mask xcb:CW:EventMask
                        :event-mask exwm--client-event-mask))
+    ;; Reparent this frame to the original one
+    (xcb:+request exwm--connection
+        (make-instance 'xcb:ReparentWindow
+                       :window outer-id :parent original-id
+                       :x (- x exwm-floating-border-width)
+                       :y (- y exwm-floating-border-width)))
     (xcb:flush exwm--connection)
     ;; Set window/buffer
     (with-current-buffer (exwm--id->buffer id)