about summary refs log tree commit diff
path: root/exwm-input.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-07-19T11·23+0800
committerChris Feng <chris.w.feng@gmail.com>2016-07-19T11·23+0800
commit3909f65bae17af118ea7b1acf714289b35ea1b3d (patch)
treeb03577683994e63873c5de26110a2862a9127c41 /exwm-input.el
parent624c72945a529c8221d12882063c7115af15a4c5 (diff)
Add support for attachable/detachable minibuffer
* exwm-workspace.el (exwm-workspace--update-minibuffer-height): Renamed
from `exwm-workspace--update-minibuffer' to better reflect its usage.

* exwm-input.el (exwm-input--update-focus): Directly put the floating
X window at top since the minibuffer is no longer a sibling.
* exwm-workspace.el (exwm-workspace--resize-minibuffer-frame): Calculate
position in absolute coordinate; put minibuffer at bottom by default;
resize the minibuffer frame with ConfigureWindow rather than
`set-frame-width'.
(exwm-workspace-switch): No need to reparent minibuffer any more.
(exwm-workspace--on-ConfigureNotify): Calculate position in absolute
coordinate.
(exwm-workspace--show-minibuffer, exwm-workspace--hide-minibuffer):
Show/Hide the minibuffer by adjusting the stacking order rather than
mapping/unmapping.
(exwm-workspace--init): Map the minibuffer frame container on creation.

* exwm-workspace.el (exwm-workspace--minibuffer-attached-p):
New function telling whether the minibuffer is attached.
(exwm-workspace--attached-minibuffer-height): New variable storing the
height of the attached minibuffer.
(exwm-workspace-attach-minibuffer, exwm-workspace-detach-minibuffer):
New functions for attaching/detaching the minibuffer.

* exwm-workspace.el (exwm-workspace--show-minibuffer): Remove the
workaround for minibuffer cursor (seems fixed).
Diffstat (limited to 'exwm-input.el')
-rw-r--r--exwm-input.el23
1 files changed, 5 insertions, 18 deletions
diff --git a/exwm-input.el b/exwm-input.el
index b9e47058f003..b0c9b2c129ea 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -125,24 +125,11 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
             (exwm-input--set-focus exwm--id)
             (when exwm--floating-frame
               ;; Adjust stacking orders of the floating container.
-              (if (exwm-workspace--minibuffer-own-frame-p)
-                  ;; Put this floating X window just below the minibuffer.
-                  (xcb:+request exwm--connection
-                      (make-instance 'xcb:ConfigureWindow
-                                     :window exwm--container
-                                     :value-mask
-                                     (logior xcb:ConfigWindow:Sibling
-                                             xcb:ConfigWindow:StackMode)
-                                     :sibling (frame-parameter
-                                               exwm-workspace--minibuffer
-                                               'exwm-container)
-                                     :stack-mode xcb:StackMode:Below))
-                ;; Put this floating X window at top.
-                (xcb:+request exwm--connection
-                    (make-instance 'xcb:ConfigureWindow
-                                   :window exwm--container
-                                   :value-mask xcb:ConfigWindow:StackMode
-                                   :stack-mode xcb:StackMode:Above)))
+              (xcb:+request exwm--connection
+                  (make-instance 'xcb:ConfigureWindow
+                                 :window exwm--container
+                                 :value-mask xcb:ConfigWindow:StackMode
+                                 :stack-mode xcb:StackMode:Above))
               ;; This floating X window might be hide by `exwm-floating-hide'.
               (when (exwm-layout--iconic-state-p)
                 (exwm-layout--set-state exwm--id