From 46fe764634ff4fa0eff7ea87c3b96209a05c89be Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Sun, 4 Mar 2018 12:23:37 +0800 Subject: Fix fullscreen mode after switching workspace and back * exwm-layout.el (exwm-layout--show): Always set an X window in fullscreen mode the size in fullscreen. (exwm-layout-unset-fullscreen): Leave the fullscreen mode first. * exwm-layout.el (exwm-layout--fullscreen-p): New function telling whether the current buffer is in fullscreen mode. (exwm-layout-set-fullscreen, exwm-layout-unset-fullscreen) (exwm-layout-toggle-fullscreen): * exwm-manage.el (exwm-manage--manage-window) (exwm-manage--on-ConfigureRequest): * exwm-workspace.el (exwm-workspace-switch, exwm-workspace-swap) (exwm-workspace-move): * exwm.el (exwm-reset, exwm--on-ClientMessage): Use it. --- exwm-workspace.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'exwm-workspace.el') diff --git a/exwm-workspace.el b/exwm-workspace.el index 0651b575d8b4..deb6a653575a 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -128,6 +128,7 @@ Please manually run the hook `exwm-workspace-list-change-hook' afterwards.") (defvar exwm-manage--desktop) (declare-function exwm--exit "exwm.el") (declare-function exwm-input--on-buffer-list-update "exwm-input.el" ()) +(declare-function exwm-layout--fullscreen-p "exwm-layout.el" ()) (declare-function exwm-layout--hide "exwm-layout.el" (id)) (declare-function exwm-layout--other-buffer-predicate "exwm-layout.el" (buffer)) @@ -504,7 +505,7 @@ for internal use only." ((null current-prefix-arg) (unless (and (eq major-mode 'exwm-mode) ;; The prompt is invisible in fullscreen mode. - (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state)) + (exwm-layout--fullscreen-p)) (let ((exwm-workspace--prompt-add-allowed t) (exwm-workspace--prompt-delete-allowed t)) (exwm-workspace--prompt-for-workspace "Switch to [+/-]: ")))) @@ -631,7 +632,7 @@ Passing a workspace frame as the first option is for internal use only." (interactive (unless (and (eq major-mode 'exwm-mode) ;; The prompt is invisible in fullscreen mode. - (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state)) + (exwm-layout--fullscreen-p)) (let (w1 w2) (let ((exwm-workspace--prompt-add-allowed t) (exwm-workspace--prompt-delete-allowed t)) @@ -671,7 +672,7 @@ before it." ((null current-prefix-arg) (unless (and (eq major-mode 'exwm-mode) ;; The prompt is invisible in fullscreen mode. - (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state)) + (exwm-layout--fullscreen-p)) (list exwm-workspace--current (exwm-workspace--position (exwm-workspace--prompt-for-workspace "Move workspace to: "))))) -- cgit 1.4.1