diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2018-02-22T14·21+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2018-02-22T14·21+0800 |
commit | 1b6272e4585c5176705944f397932d9a9de212e6 (patch) | |
tree | a4501cae3f062838c06e6e2b42be42fc785df6f3 /exwm-randr.el | |
parent | 32b88f4bd0274e8ee1d4215ed52ee6d3c460c013 (diff) |
Hide blocked frames (they are visible with a compositor)
* exwm-workspace.el (exwm-workspace--set-active): New function for setting the 'exwm-active' frame parameter and show/hide frames BTW. (exwm-workspace--active-p): New function checking whether a frame is active. (exwm-workspace--set-fullscreen, exwm-workspace-switch) (exwm-workspace-move-window): * exwm-randr.el (exwm-randr--refresh): Use them. * exwm-workspace.el (exwm-workspace-attach-minibuffer) (exwm-workspace--show-minibuffer, exwm-workspace--hide-minibuffer): Show/Hide the minibuffer frame.
Diffstat (limited to 'exwm-randr.el')
-rw-r--r-- | exwm-randr.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/exwm-randr.el b/exwm-randr.el index c78a4ec812aa..a3593ec05b11 100644 --- a/exwm-randr.el +++ b/exwm-randr.el @@ -81,7 +81,10 @@ the first one in result being the primary output." (defvar exwm-workspace--fullscreen-frame-count) (defvar exwm-workspace--list) +(declare-function exwm-workspace--active-p "exwm-workspace.el" (frame)) (declare-function exwm-workspace--count "exwm-workspace.el") +(declare-function exwm-workspace--set-active "exwm-workspace.el" + (frame active)) (declare-function exwm-workspace--set-desktop-geometry "exwm-workspace.el" ()) (declare-function exwm-workspace--set-fullscreen "exwm-workspace.el" (frame)) (declare-function exwm-workspace--show-minibuffer "exwm-workspace.el" ()) @@ -138,7 +141,9 @@ the first one in result being the primary output." container-frame-alist)) (set-frame-parameter frame 'exwm-randr-output output) (set-frame-parameter frame 'exwm-geometry geometry))) - ;; Update the 'exwm-active' frame parameter. + ;; Update active/inactive workspaces. + (dolist (w exwm-workspace--list) + (exwm-workspace--set-active w nil)) (dolist (xwin (reverse (slot-value (xcb:+request-unchecked+reply exwm--connection @@ -149,8 +154,8 @@ the first one in result being the primary output." (when output (setq container-output-alist (rassq-delete-all output container-output-alist)) - (set-frame-parameter (cdr (assq xwin container-frame-alist)) - 'exwm-active t)))) + (exwm-workspace--set-active (cdr (assq xwin container-frame-alist)) + t)))) ;; Update workareas. (exwm-workspace--update-workareas) ;; Resize workspace. |