screen: export RandR information
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
8c87b7cb57
commit
c08b90345f
|
@ -65,6 +65,7 @@ name
|
||||||
ontop
|
ontop
|
||||||
opacity
|
opacity
|
||||||
orientation
|
orientation
|
||||||
|
outputs
|
||||||
pid
|
pid
|
||||||
release
|
release
|
||||||
resize
|
resize
|
||||||
|
|
14
screen.c
14
screen.c
|
@ -516,6 +516,20 @@ luaA_screen_index(lua_State *L)
|
||||||
case A_TK_WORKAREA:
|
case A_TK_WORKAREA:
|
||||||
luaA_pusharea(L, screen_area_get(s, true));
|
luaA_pusharea(L, screen_area_get(s, true));
|
||||||
break;
|
break;
|
||||||
|
case A_TK_OUTPUTS:
|
||||||
|
{
|
||||||
|
lua_createtable(L, 0, s->outputs.len);
|
||||||
|
foreach(output, s->outputs)
|
||||||
|
{
|
||||||
|
lua_createtable(L, 2, 0);
|
||||||
|
lua_pushinteger(L, output->mm_width);
|
||||||
|
lua_setfield(L, -2, "mm_width");
|
||||||
|
lua_pushinteger(L, output->mm_height);
|
||||||
|
lua_setfield(L, -2, "mm_height");
|
||||||
|
lua_setfield(L, -2, output->name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue