client: add support for WM_CLIENT_MACHINE
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
9f503e5a13
commit
32167500c6
9
client.c
9
client.c
|
@ -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));
|
||||||
|
|
|
@ -34,6 +34,7 @@ label
|
||||||
layout
|
layout
|
||||||
left
|
left
|
||||||
line
|
line
|
||||||
|
machine
|
||||||
mwfact
|
mwfact
|
||||||
ncol
|
ncol
|
||||||
nmaster
|
nmaster
|
||||||
|
|
Loading…
Reference in New Issue