awesome_atexit: keep client order always
This is not only useful for soft restarts, but also when TERMinating awesome during development/testing. The drawback appears to be that it would leak a property on the root window in case it is really meant to be quit. Closes https://github.com/awesomeWM/awesome/pull/374.
This commit is contained in:
parent
b75f374d9c
commit
4aa6c33951
19
awesome.c
19
awesome.c
|
@ -85,18 +85,15 @@ awesome_atexit(bool restart)
|
||||||
(*c)->geometry.x, (*c)->geometry.y);
|
(*c)->geometry.x, (*c)->geometry.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restart)
|
/* Save the client order. This is useful also for "hard" restarts. */
|
||||||
{
|
xcb_window_t *wins = p_alloca(xcb_window_t, globalconf.clients.len);
|
||||||
/* Save the client order across restarts */
|
int n = 0;
|
||||||
xcb_window_t *wins = p_alloca(xcb_window_t, globalconf.clients.len);
|
foreach(client, globalconf.clients)
|
||||||
int n = 0;
|
wins[n++] = (*client)->window;
|
||||||
foreach(client, globalconf.clients)
|
|
||||||
wins[n++] = (*client)->window;
|
|
||||||
|
|
||||||
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
|
||||||
globalconf.screen->root,
|
globalconf.screen->root,
|
||||||
AWESOME_CLIENT_ORDER, XCB_ATOM_WINDOW, 32, n, wins);
|
AWESOME_CLIENT_ORDER, XCB_ATOM_WINDOW, 32, n, wins);
|
||||||
}
|
|
||||||
|
|
||||||
a_dbus_cleanup();
|
a_dbus_cleanup();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue