From caa63d43d7c0b8d35317a2840e57dba59c73465e Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 30 Sep 2008 11:45:41 +0200 Subject: [PATCH] client: export size hints Signed-off-by: Julien Danjou --- client.c | 11 +++++++++++ common/tokenize.gperf | 1 + 2 files changed, 12 insertions(+) diff --git a/client.c b/client.c index bcb75ab3..560c7a45 100644 --- a/client.c +++ b/client.c @@ -1491,6 +1491,17 @@ luaA_client_index(lua_State *L) case A_TK_URGENT: lua_pushboolean(L, (*c)->isurgent); break; + case A_TK_SIZEHINTS: + lua_newtable(L); + lua_pushboolean(L, (*c)->size_hints.flags & XCB_SIZE_HINT_US_POSITION); + lua_setfield(L, -2, "user_position"); + lua_pushboolean(L, (*c)->size_hints.flags & XCB_SIZE_HINT_US_SIZE); + lua_setfield(L, -2, "user_size"); + lua_pushboolean(L, (*c)->size_hints.flags & XCB_SIZE_HINT_P_POSITION); + lua_setfield(L, -2, "program_position"); + lua_pushboolean(L, (*c)->size_hints.flags & XCB_SIZE_HINT_P_SIZE); + lua_setfield(L, -2, "program_size"); + break; default: return 0; } diff --git a/common/tokenize.gperf b/common/tokenize.gperf index bed67de7..913e3a73 100644 --- a/common/tokenize.gperf +++ b/common/tokenize.gperf @@ -59,6 +59,7 @@ selected shadow shadow_offset show_icons +sizehints south sticky text