client: use window attribute rather than invalid

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-10-13 15:43:50 +02:00 committed by Uli Schlachter
parent 3fbb5f1535
commit 712234b133
2 changed files with 2 additions and 4 deletions

View File

@ -1002,7 +1002,7 @@ client_unmanage(client_t *c)
xwindow_set_state(c->window, XCB_WM_STATE_WITHDRAWN); xwindow_set_state(c->window, XCB_WM_STATE_WITHDRAWN);
/* set client as invalid */ /* set client as invalid */
c->invalid = true; c->window = XCB_NONE;
luaA_object_unref(globalconf.L, c); luaA_object_unref(globalconf.L, c);
} }
@ -1731,7 +1731,7 @@ luaA_client_module_newindex(lua_State *L)
static bool static bool
client_checker(client_t *c) client_checker(client_t *c)
{ {
return !c->invalid; return c->window != XCB_NONE;
} }
void void

View File

@ -65,8 +65,6 @@ typedef enum
struct client_t struct client_t
{ {
WINDOW_OBJECT_HEADER WINDOW_OBJECT_HEADER
/** Valid, or not ? */
bool invalid;
/** Client name */ /** Client name */
char *name, *alt_name, *icon_name, *alt_icon_name; char *name, *alt_name, *icon_name, *alt_icon_name;
/** WM_CLASS stuff */ /** WM_CLASS stuff */