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-manage.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-manage.el')
-rw-r--r-- | exwm-manage.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/exwm-manage.el b/exwm-manage.el index 94aefd8c555f..b5c3f58dfdde 100644 --- a/exwm-manage.el +++ b/exwm-manage.el @@ -109,6 +109,7 @@ You can still make the X windows floating afterwards." (declare-function exwm-floating--unset-floating "exwm-floating.el" (id)) (declare-function exwm-input-grab-keyboard "exwm-input.el") (declare-function exwm-input-set-local-simulation-keys "exwm-input.el") +(declare-function exwm-layout--fullscreen-p "exwm-layout.el" ()) (declare-function exwm-layout--iconic-state-p "exwm-layout.el" (&optional id)) (declare-function exwm-workspace--count "exwm-workspace.el" ()) (declare-function exwm-workspace--position "exwm-workspace.el" (frame)) @@ -318,7 +319,7 @@ You can still make the X windows floating afterwards." (exwm-manage--update-ewmh-state id) (with-current-buffer (exwm--id->buffer id) (when (or (plist-get exwm--configurations 'fullscreen) - (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state)) + (exwm-layout--fullscreen-p)) (setq exwm--ewmh-state (delq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state)) (exwm-layout-set-fullscreen id)) @@ -533,7 +534,7 @@ border-width: %d; sibling: #x%x; stack-mode: %d" border-width sibling stack-mode) (if (and (setq buffer (exwm--id->buffer window)) (with-current-buffer buffer - (or (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state) + (or (exwm-layout--fullscreen-p) ;; Make sure it's a floating X window wanting to resize ;; itself. (or (not exwm--floating-frame) @@ -559,7 +560,7 @@ border-width: %d; sibling: #x%x; stack-mode: %d" ;; Send client message for managed windows (with-current-buffer buffer (setq edges - (if (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state) + (if (exwm-layout--fullscreen-p) (with-slots (x y width height) (exwm-workspace--get-geometry exwm--frame) (list x y width height)) |