From cf10839db8eec446e4d88f0f187cfce46564436c Mon Sep 17 00:00:00 2001 From: James Wright Date: Thu, 11 Dec 2008 18:19:36 -0800 Subject: [PATCH] Make gnome-panel recognize closed windows My version of gnome-panel ignores _NET_CLIENT_LIST updates when they are not consistent with the _NET_CLIENT_LIST_STACKING state. However, when a window was unmapped, stumpwm was previously doing the following: 1. update _NET_CLIENT_LIST property based on `screen-mapped-windows', which does not include the newly-unmapped window. 2. update _NET_CLIENT_LIST_STACKING property based on `all-windows', which is created by concatenating all the windows in the group. Problem: `withdraw-window' was calling `remove-mapped-window' (which sends the updates) BEFORE it removed the unmapped window from its tile-group. So the unmapped window was removed from _NET_CLIENT_LIST, but not from _NET_CLIENT_LIST_STACKING. But gnome-panel ignores client list updates whenever _NET_CLIENT_LIST and_NET_CLIENT_LIST_STACKING are inconsistent. So the fix, which is much shorter than this comment, changes `withdraw-window' to remove the withdrawn window from its tile-group and then call `remove-mapped-window'. --- window.lisp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/window.lisp b/window.lisp index cb7157e..f958ff9 100644 --- a/window.lisp +++ b/window.lisp @@ -742,9 +742,9 @@ needed." (xwin-state (window-xwin window)) +withdrawn-state+) (xlib:unmap-window (window-parent window)) ;; Clean up the window's entry in the screen and group - (screen-remove-mapped-window screen (window-xwin window)) (setf (group-windows group) (delete window (group-windows group))) + (screen-remove-mapped-window screen (window-xwin window)) (when (window-in-current-group-p window) ;; since the window doesn't exist, it doesn't have focus. (setf (screen-focus screen) nil)) -- 1.5.4.3