From 8183c509d929306bdeb39e26c378b99976c3cac5 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Mon, 22 Apr 2002 03:23:29 +0000 Subject: [PATCH] add error trap, fixes a possible BadWindow if a window closed itself in 2002-04-21 Havoc Pennington * src/window.c (meta_window_send_icccm_message): add error trap, fixes a possible BadWindow if a window closed itself in response to the delete window message prior to us sending the ping message. --- ChangeLog | 6 ++++++ src/window.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d5243dda4..51b530e9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-04-21 Havoc Pennington + + * src/window.c (meta_window_send_icccm_message): add error trap, + fixes a possible BadWindow if a window closed itself in response + to the delete window message prior to us sending the ping message. + 2002-04-21 Havoc Pennington * src/window.c (meta_window_move_resize_now): never revert to diff --git a/src/window.c b/src/window.c index 2f49c90f7..3cbf700e7 100644 --- a/src/window.c +++ b/src/window.c @@ -2746,9 +2746,11 @@ meta_window_send_icccm_message (MetaWindow *window, ev.format = 32; ev.data.l[0] = atom; ev.data.l[1] = timestamp; - + + meta_error_trap_push (window->display); XSendEvent (window->display->xdisplay, window->xwindow, False, 0, (XEvent*) &ev); + meta_error_trap_pop (window->display); } gboolean