about summary refs log tree commit diff
path: root/exwm-workspace.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-08-06T04·32+0800
committerChris Feng <chris.w.feng@gmail.com>2015-08-06T04·32+0800
commit3fb90b9eaac752760fc32404cbd1574b8ef61669 (patch)
tree72e84246d73dead72b503c281ce1595144890c9c /exwm-workspace.el
parentcaf2feec639e26506b787a07889aaf28ee9c3c3f (diff)
Fix fullscreen issues
* Correct ConfigureNotify events sent to fullscreen windows.
* Exit fullscreen mode before switching workspace.
* Temporarily treat `xcb:Atom:_NET_WM_STATE_ABOVE` as
  `xcb:Atom:_NET_WM_STATE_FULLSCREEN` since
  a) "plugin-container" (Flash Player) seems only set this, and
  b) it's not normally used by applications.
  This makes fullscreen videos working in e.g. iceweasel.
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r--exwm-workspace.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 3add2121ff4a..ed06f64ad2e5 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -111,6 +111,11 @@ 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)))
       (let ((frame (elt exwm-workspace--list index)))
         (setq exwm-workspace--current frame
               exwm-workspace-current-index index)