From 1e36a22b3f5fd3867f29eaf3e1891422a3bb952c Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Thu, 6 Aug 2015 14:41:28 +0800 Subject: Check buffer mode in exwm-reset This should prevent users from misoperation. --- exwm-workspace.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'exwm-workspace.el') diff --git a/exwm-workspace.el b/exwm-workspace.el index ed06f64ad2e5..d700f41a14c5 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -111,11 +111,7 @@ The optional FORCE option is for internal use only." (unless (and (<= 0 index) (< index exwm-workspace-number)) (user-error "[EXWM] Workspace index out of range: %d" index)) (when (or force (/= exwm-workspace-current-index index)) - ;; Exit fullscreen mode - (with-current-buffer (window-buffer) - (when (and (eq major-mode 'exwm-mode) exwm--fullscreen) - (exwm-layout-unset-fullscreen) - (exwm-input-grab-keyboard))) + (exwm-reset) ;exit full screen (let ((frame (elt exwm-workspace--list index))) (setq exwm-workspace--current frame exwm-workspace-current-index index) -- cgit 1.4.1