[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm ba0f41d 3/5: ; * exwm-manage.el (exwm-manage--mana
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm ba0f41d 3/5: ; * exwm-manage.el (exwm-manage--manage-window): Check the value range |
Date: |
Sat, 30 Jul 2016 02:21:50 +0000 (UTC) |
branch: externals/exwm
commit ba0f41db1b377196af8aa6607ef215e48a3daa26
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
; * exwm-manage.el (exwm-manage--manage-window): Check the value range
; of _NET_WM_DESKTOP.
---
exwm-manage.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/exwm-manage.el b/exwm-manage.el
index 9e05ea2..c083229 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -98,6 +98,7 @@ corresponding buffer.")
(declare-function exwm-workspace--current-height "exwm-workspace.el")
(declare-function exwm-workspace--current-width "exwm-workspace.el")
(declare-function exwm-workspace--set-desktop "exwm-workspace.el" (id))
+(declare-function exwm-workspace--count "exwm-workspace.el" ())
(declare-function exwm-workspace-move-window "exwm-workspace.el"
(frame-or-index &optional id))
@@ -254,7 +255,10 @@ corresponding buffer.")
desktop)
(when reply
(setq desktop (slot-value reply 'value)))
- (if (and desktop (/= desktop exwm-workspace-current-index))
+ (if (and desktop
+ (/= desktop exwm-workspace-current-index)
+ ;; Check the range.
+ (< desktop (exwm-workspace--count)))
(exwm-workspace-move-window desktop id)
(exwm-workspace--set-desktop id)))
(with-current-buffer (exwm--id->buffer id)