Fix previous commit "Remove duplicate code"

* exwm-layout.el (exwm-layout-unset-fullscreen):
`xcb:Atom:_NET_WM_STATE_FULLSCREEN' must be excised before
invoking `exwm-layout--show'.
This commit is contained in:
Adrián Medraño Calvo 2021-11-10 00:00:00 +00:00
parent 5098708c92
commit 08f20ea0b9

View file

@ -219,6 +219,11 @@
(exwm-layout--fullscreen-p)) (exwm-layout--fullscreen-p))
(cl-return-from exwm-layout-unset-fullscreen)) (cl-return-from exwm-layout-unset-fullscreen))
(with-current-buffer (if id (exwm--id->buffer id) (window-buffer)) (with-current-buffer (if id (exwm--id->buffer id) (window-buffer))
;; `exwm-layout--show' relies on `exwm--ewmh-state' to decide whether to
;; fullscreen the window.
(setq exwm--ewmh-state
(delq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state))
(exwm-layout--set-ewmh-state exwm--id)
(if exwm--floating-frame (if exwm--floating-frame
(exwm-layout--show exwm--id (frame-root-window exwm--floating-frame)) (exwm-layout--show exwm--id (frame-root-window exwm--floating-frame))
(xcb:+request exwm--connection (xcb:+request exwm--connection
@ -231,9 +236,6 @@
(let ((window (get-buffer-window nil t))) (let ((window (get-buffer-window nil t)))
(when window (when window
(exwm-layout--show exwm--id window)))) (exwm-layout--show exwm--id window))))
(setq exwm--ewmh-state
(delq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state))
(exwm-layout--set-ewmh-state exwm--id)
(xcb:flush exwm--connection) (xcb:flush exwm--connection)
(set-window-dedicated-p (get-buffer-window) nil) (set-window-dedicated-p (get-buffer-window) nil)
(when (eq 'line-mode exwm--selected-input-mode) (when (eq 'line-mode exwm--selected-input-mode)