From 58f79dca8a85bea6110568e5aa2c327dd5a4e438 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 14 Jul 2010 21:35:06 +0200 Subject: [PATCH] Add all managed client windows to the safe set When an application loses its connection to the X11 server, all the windows in its save-set are saved by reparenting them back to their closest ancestor. Also, to they are unconditionally mapped. This second property is exactly what we need: All windows should be in mapped state, else the next window manager which starts up won't be managing them. This should fix all bugs where clients where lost due to a restart, yay! :) Signed-off-by: Uli Schlachter --- objects/client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/objects/client.c b/objects/client.c index af01c0115..7413bdc2d 100644 --- a/objects/client.c +++ b/objects/client.c @@ -427,6 +427,9 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int phys_screen, xcb_change_window_attributes(globalconf.connection, w, XCB_CW_EVENT_MASK, select_input_val); + /* Make sure the window is automatically mapped if awesome exits or dies. */ + xcb_change_save_set(globalconf.connection, XCB_SET_MODE_INSERT, w); + client_t *c = client_new(globalconf.L); /* This cannot change, ever. */