diff options
author | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2016-07-17T12·00+0000 |
---|---|---|
committer | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2016-07-17T12·00+0000 |
commit | 8e2da00b6e7e530a53b584184dc94b9366ae7c69 (patch) | |
tree | f825fbaec94ca8fd119e6d98467d22755a3cacc6 /exwm-randr.el | |
parent | ed6a18a697bc1eb8bf09a12c04ffa3200a5248cd (diff) |
Add helper for counting number of workspaces
* exwm-workspace.el (exwm-workspace--count): New function. * exwm-randr.el (exwm-randr--refresh): * exwm-workspace.el (exwm-workspace--switch-map) (exwm-workspace--update-switch-history, exwm-workspace-switch) (exwm-workspace-move-window, exwm-workspace--init) (exwm-workspace--post-init): Use it.
Diffstat (limited to 'exwm-randr.el')
-rw-r--r-- | exwm-randr.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/exwm-randr.el b/exwm-randr.el index 85daff245d19..ac3341db3c49 100644 --- a/exwm-randr.el +++ b/exwm-randr.el @@ -55,11 +55,11 @@ "Normal hook run when the RandR module just refreshed.") (defvar exwm-workspace--fullscreen-frame-count) -(defvar exwm-workspace-number) (defvar exwm-workspace--list) -(declare-function exwm-workspace--update-workareas "exwm-workspace.el" ()) +(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--set-desktop-geometry "exwm-workspace.el" ()) (defun exwm-randr--refresh () @@ -97,7 +97,7 @@ (when exwm-workspace--fullscreen-frame-count ;; Not all workspaces are fullscreen; reset this counter. (setq exwm-workspace--fullscreen-frame-count 0)) - (dotimes (i exwm-workspace-number) + (dotimes (i (exwm-workspace--count)) (let* ((output (plist-get exwm-randr-workspace-output-plist i)) (geometry (lax-plist-get output-plist output)) (frame (elt exwm-workspace--list i))) |