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 class The client class.
* \lfield instance The client instance. * \lfield instance The client instance.
* \lfield pid The client PID, if available. * \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 floating_placement The floating placement used for this client.
* \lfield screen Client screen number. * \lfield screen Client screen number.
* \lfield hide Define if the client must be hidden, i.e. never mapped. * \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) luaA_client_index(lua_State *L)
{ {
size_t len; size_t len;
ssize_t slen;
client_t **c = luaA_checkudata(L, 1, "client"); client_t **c = luaA_checkudata(L, 1, "client");
const char *buf = luaL_checklstring(L, 2, &len); const char *buf = luaL_checklstring(L, 2, &len);
char *value;
void *data; void *data;
xutil_class_hint_t hint; xutil_class_hint_t hint;
xcb_get_property_cookie_t prop_c; xcb_get_property_cookie_t prop_c;
@ -1251,6 +1254,12 @@ luaA_client_index(lua_State *L)
return 0; return 0;
} }
break; 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: case A_TK_FLOATING_PLACEMENT:
lua_pushstring(L, name_func_rlookup((*c)->floating_placement, lua_pushstring(L, name_func_rlookup((*c)->floating_placement,
FloatingPlacementList)); FloatingPlacementList));

View File

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