client: add support for WM_CLIENT_MACHINE

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-11 11:09:44 +02:00
parent 9f503e5a13
commit 32167500c6
2 changed files with 10 additions and 0 deletions

View file

@ -1192,6 +1192,7 @@ luaA_client_newindex(lua_State *L)
* \lfield class The client class.
* \lfield instance The client instance.
* \lfield pid The client PID, if available.
* \lfield machine The machine client is running on.
* \lfield floating_placement The floating placement used for this client.
* \lfield screen Client screen number.
* \lfield hide Define if the client must be hidden, i.e. never mapped.
@ -1209,8 +1210,10 @@ static int
luaA_client_index(lua_State *L)
{
size_t len;
ssize_t slen;
client_t **c = luaA_checkudata(L, 1, "client");
const char *buf = luaL_checklstring(L, 2, &len);
char *value;
void *data;
xutil_class_hint_t hint;
xcb_get_property_cookie_t prop_c;
@ -1251,6 +1254,12 @@ luaA_client_index(lua_State *L)
return 0;
}
break;
case A_TK_MACHINE:
if(!xutil_gettextprop(globalconf.connection, (*c)->win, WM_CLIENT_MACHINE, &value, &slen))
return 0;
lua_pushlstring(L, value, slen);
p_delete(&value);
break;
case A_TK_FLOATING_PLACEMENT:
lua_pushstring(L, name_func_rlookup((*c)->floating_placement,
FloatingPlacementList));

View file

@ -34,6 +34,7 @@ label
layout
left
line
machine
mwfact
ncol
nmaster