From bfa35c0e388e5b4daf27aa162ecb6323f7716c85 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Tue, 20 Feb 2018 22:09:27 +0800 Subject: [PATCH] Remove redundant code for fullscreen mode * exwm-manage.el (exwm-manage--unmanage-window) (exwm--on-ClientMessage): No need to modify workspace when an X window enters/leaves fullscreen mode. --- exwm-manage.el | 3 --- exwm.el | 17 +++++++---------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/exwm-manage.el b/exwm-manage.el index dd7c2e395..e067eda1f 100644 --- a/exwm-manage.el +++ b/exwm-manage.el @@ -322,9 +322,6 @@ manager is shutting down." :window window :parent exwm--root :x 0 :y 0)) (xcb:+request exwm--connection (make-instance 'xcb:DestroyWindow :window container)))) - ;; Restore the workspace if this X window is currently fullscreen. - (when (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state) - (exwm-workspace--set-fullscreen exwm--frame)) (exwm-manage--set-client-list) (xcb:flush exwm--connection)) (let ((kill-buffer-func diff --git a/exwm.el b/exwm.el index 5cba3785f..0b78b6b0b 100644 --- a/exwm.el +++ b/exwm.el @@ -480,16 +480,13 @@ (when (and (not buffer) (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN props) (= action xcb:ewmh:_NET_WM_STATE_ADD)) - (dolist (f exwm-workspace--list) - (when (equal (frame-parameter f 'exwm-outer-id) id) - (exwm-workspace--set-fullscreen f) - (xcb:+request - exwm--connection - (make-instance 'xcb:ewmh:set-_NET_WM_STATE - :window id - :data (vector - xcb:Atom:_NET_WM_STATE_FULLSCREEN))) - (xcb:flush exwm--connection)))) + (xcb:+request + exwm--connection + (make-instance 'xcb:ewmh:set-_NET_WM_STATE + :window id + :data (vector + xcb:Atom:_NET_WM_STATE_FULLSCREEN))) + (xcb:flush exwm--connection)) (when buffer ;ensure it's managed (with-current-buffer buffer ;; _NET_WM_STATE_FULLSCREEN