From 0c114d97b78f806ebe2904c8f55f573fd7c879e7 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Thu, 21 Jul 2016 12:48:12 +0800 Subject: Fix workspace creation and deletion * exwm-workspace.el (exwm-workspace-switch) (exwm-workspace-switch-create): Move support for creating missing workspaces from the former to the latter.. (exwm-workspace-switch-create-limit): New variable limiting the number of new workspaces allowed to create each time. * exwm-workspace.el (exwm-workspace--prompt-add) (exwm-workspace--prompt-delete): New commands for adding and deleting workspaces from the `read-from-minibuffer' prompt. (exwm-workspace--prompt-add-allowed) (exwm-workspace--prompt-delete-allowed): New variables telling whether the above two commands are allowed to run. (exwm-workspace--switch-map): Change "+" / "-" to use the new commands. * exwm-workspace.el (exwm-workspace-switch, exwm-workspace-swap) (exwm-workspace-move-window): Use this new feature. * exwm-workspace.el (exwm-workspace-add, exwm-workspace-delete): Since they are not used by the keymap any more, drop the use of idle timer. * exwm-workspace.el (exwm-workspace--create-silently): New variable indicating whether new workspaces should be created in the background. (exwm-workspace--add-frame-as-workspace): Support creating new workspaces in the background. * exwm-workspace.el (exwm-workspace--on-ConfigureNotify): Update workareas if it's not up to date. * exwm-randr.el (exwm-randr--refresh): Raise the standalone minibuffer when refreshed. * exwm-config.el (exwm-config-default): Add `exwm-workspace-number' and `exwm-workspace-switch-create'. --- exwm-randr.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'exwm-randr.el') diff --git a/exwm-randr.el b/exwm-randr.el index 709469a44d0a..4ce1752d9ee8 100644 --- a/exwm-randr.el +++ b/exwm-randr.el @@ -60,6 +60,7 @@ (declare-function exwm-workspace--count "exwm-workspace.el") (declare-function exwm-workspace--set-fullscreen "exwm-workspace.el" (frame)) (declare-function exwm-workspace--update-workareas "exwm-workspace.el" ()) +(declare-function exwm-workspace--show-minibuffer "exwm-workspace.el" ()) (declare-function exwm-workspace--set-desktop-geometry "exwm-workspace.el" ()) (defun exwm-randr--refresh () @@ -111,6 +112,10 @@ ;; Resize workspace. (dolist (f exwm-workspace--list) (exwm-workspace--set-fullscreen f)) + ;; Raise the minibuffer if it's active. + (when (and (active-minibuffer-window) + (exwm-workspace--minibuffer-own-frame-p)) + (exwm-workspace--show-minibuffer)) ;; Set _NET_DESKTOP_GEOMETRY. (exwm-workspace--set-desktop-geometry) (xcb:flush exwm--connection) -- cgit 1.4.1