about summary refs log tree commit diff
path: root/third_party/exwm/exwm-layout.el
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/exwm/exwm-layout.el')
-rw-r--r--third_party/exwm/exwm-layout.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/third_party/exwm/exwm-layout.el b/third_party/exwm/exwm-layout.el
index 79d0c95bcd..9173a1c049 100644
--- a/third_party/exwm/exwm-layout.el
+++ b/third_party/exwm/exwm-layout.el
@@ -1,6 +1,6 @@
 ;;; exwm-layout.el --- Layout Module for EXWM  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2021 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng <chris.w.feng@gmail.com>
 
@@ -219,8 +219,11 @@
                (exwm-layout--fullscreen-p))
     (cl-return-from exwm-layout-unset-fullscreen))
   (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
         (exwm-layout--show exwm--id (frame-root-window exwm--floating-frame))
       (xcb:+request exwm--connection
@@ -233,9 +236,6 @@
       (let ((window (get-buffer-window nil t)))
         (when 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)
     (set-window-dedicated-p (get-buffer-window) nil)
     (when (eq 'line-mode exwm--selected-input-mode)