diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2018-03-04T04·23+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2018-03-04T04·29+0800 |
commit | 46fe764634ff4fa0eff7ea87c3b96209a05c89be (patch) | |
tree | 3cd4e040f3b3b463638a6cdefcf0a1ca3496369e /exwm.el | |
parent | 277377c718429555f75a88a85f336d80f3716dce (diff) |
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.
Diffstat (limited to 'exwm.el')
-rw-r--r-- | exwm.el | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/exwm.el b/exwm.el index ed251f30adfc..0387426ffc68 100644 --- a/exwm.el +++ b/exwm.el @@ -110,7 +110,7 @@ (interactive) (with-current-buffer (window-buffer) (when (eq major-mode 'exwm-mode) - (when (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state) + (when (exwm-layout--fullscreen-p) (exwm-layout-unset-fullscreen)) ;; Force refresh (exwm-layout--refresh) @@ -484,8 +484,7 @@ exwm--connection (make-instance 'xcb:ewmh:set-_NET_WM_STATE :window id - :data (vector - xcb:Atom:_NET_WM_STATE_FULLSCREEN))) + :data (vector xcb:Atom:_NET_WM_STATE_FULLSCREEN))) (xcb:flush exwm--connection)) (when buffer ;ensure it's managed (with-current-buffer buffer @@ -493,17 +492,14 @@ (when (or (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN props) (memq xcb:Atom:_NET_WM_STATE_ABOVE props)) (cond ((= action xcb:ewmh:_NET_WM_STATE_ADD) - (unless (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN - exwm--ewmh-state) + (unless (exwm-layout--fullscreen-p) (exwm-layout-set-fullscreen id)) (push xcb:Atom:_NET_WM_STATE_FULLSCREEN props-new)) ((= action xcb:ewmh:_NET_WM_STATE_REMOVE) - (when (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN - exwm--ewmh-state) + (when (exwm-layout--fullscreen-p) (exwm-layout-unset-fullscreen id))) ((= action xcb:ewmh:_NET_WM_STATE_TOGGLE) - (if (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN - exwm--ewmh-state) + (if (exwm-layout--fullscreen-p) (exwm-layout-unset-fullscreen id) (exwm-layout-set-fullscreen id) (push xcb:Atom:_NET_WM_STATE_FULLSCREEN props-new))))) |