From db6a72259f627ccc7d656002c79d9420be7dfc3a Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 25 Oct 2013 19:46:16 +0000 Subject: A client_delete should behave differently depending on whether the triggering event was unmap (with pending destroy) log destroy; we only need to grab/ungrab the server lock, set WithdrawnState and XRemoveFromSaveSet clients coming from an unmap event - doing so for clients coming from destroy are already gone, hence we generate errors. --- xevents.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xevents.c') diff --git a/xevents.c b/xevents.c index 786ae0c..d92386b 100644 --- a/xevents.c +++ b/xevents.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: xevents.c,v 1.90 2013/07/15 23:51:59 okan Exp $ + * $OpenBSD: xevents.c,v 1.91 2013/10/25 19:46:16 okan Exp $ */ /* @@ -113,7 +113,7 @@ xev_handle_unmapnotify(XEvent *ee) */ if (XCheckTypedWindowEvent(X_Dpy, cc->win, DestroyNotify, &ev) || e->send_event != 0) { - client_delete(cc); + client_delete(cc, 1); } else client_hide(cc); } @@ -127,7 +127,7 @@ xev_handle_destroynotify(XEvent *ee) struct client_ctx *cc; if ((cc = client_find(e->window)) != NULL) - client_delete(cc); + client_delete(cc, 0); } static void -- cgit v1.2.3-2-gb3c3