From 4aea4e7dc63009dfe35f790b19d1c41cc2840702 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Thu, 28 Mar 2002 03:49:18 +0000 Subject: [PATCH] remove unmanaged windows from save set, and unselect input so we don't get 2002-03-27 Havoc Pennington * src/window.c (meta_window_free): remove unmanaged windows from save set, and unselect input so we don't get events from them. Fixes annoying bug where withdrawn windows would decide to map themselves due to save set stuff. --- ChangeLog | 8 ++++++++ src/window.c | 13 ++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bd54089a4..678dcabee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-03-27 Havoc Pennington + + * src/window.c (meta_window_free): remove + unmanaged windows from save set, and unselect + input so we don't get events from them. Fixes annoying + bug where withdrawn windows would decide to map themselves + due to save set stuff. + 2002-03-22 Zbigniew Chyla * configure.in (ALL_LINGUAS): Added pl (Polish). diff --git a/src/window.c b/src/window.c index 77c2599a6..329b22220 100644 --- a/src/window.c +++ b/src/window.c @@ -817,12 +817,23 @@ meta_window_free (MetaWindow *window) meta_display_unregister_x_window (window->display, window->xwindow); - /* Put back anything we messed up */ + meta_error_trap_push (window->display); + + /* Put back anything we messed up */ if (window->border_width != 0) XSetWindowBorderWidth (window->display->xdisplay, window->xwindow, window->border_width); + + /* No save set */ + XRemoveFromSaveSet (window->display->xdisplay, + window->xwindow); + + /* Don't get events on not-managed windows */ + XSelectInput (window->display->xdisplay, + window->xwindow, + NoEventMask); meta_error_trap_pop (window->display);