client: export window type
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
427679b0fa
commit
8b21d64df6
21
client.c
21
client.c
|
@ -1366,6 +1366,7 @@ luaA_client_newindex(lua_State *L)
|
||||||
* \return The number of elements pushed on stack.
|
* \return The number of elements pushed on stack.
|
||||||
* \luastack
|
* \luastack
|
||||||
* \lfield name The client title.
|
* \lfield name The client title.
|
||||||
|
* \lfield type The window type (desktop, normal, dock, …).
|
||||||
* \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.
|
||||||
|
@ -1411,6 +1412,26 @@ luaA_client_index(lua_State *L)
|
||||||
case A_TK_NAME:
|
case A_TK_NAME:
|
||||||
lua_pushstring(L, (*c)->name);
|
lua_pushstring(L, (*c)->name);
|
||||||
break;
|
break;
|
||||||
|
case A_TK_TYPE:
|
||||||
|
switch((*c)->type)
|
||||||
|
{
|
||||||
|
case WINDOW_TYPE_DESKTOP:
|
||||||
|
lua_pushliteral(L, "desktop");
|
||||||
|
break;
|
||||||
|
case WINDOW_TYPE_DOCK:
|
||||||
|
lua_pushliteral(L, "dock");
|
||||||
|
break;
|
||||||
|
case WINDOW_TYPE_SPLASH:
|
||||||
|
lua_pushliteral(L, "splash");
|
||||||
|
break;
|
||||||
|
case WINDOW_TYPE_DIALOG:
|
||||||
|
lua_pushliteral(L, "dialog");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
lua_pushliteral(L, "normal");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case A_TK_CLASS:
|
case A_TK_CLASS:
|
||||||
if(!xcb_get_wm_class_reply(globalconf.connection,
|
if(!xcb_get_wm_class_reply(globalconf.connection,
|
||||||
xcb_get_wm_class_unchecked(globalconf.connection, (*c)->win),
|
xcb_get_wm_class_unchecked(globalconf.connection, (*c)->win),
|
||||||
|
|
|
@ -64,6 +64,7 @@ top
|
||||||
topleft
|
topleft
|
||||||
topright
|
topright
|
||||||
true
|
true
|
||||||
|
type
|
||||||
urgent
|
urgent
|
||||||
visible
|
visible
|
||||||
vertical
|
vertical
|
||||||
|
|
Loading…
Reference in New Issue