diff --git a/client.c b/client.c index fc9f59cb..5a6231ab 100644 --- a/client.c +++ b/client.c @@ -1477,6 +1477,7 @@ luaA_client_newindex(lua_State *L) * \lfield maximized_horizontal The client is maximized horizontally or not. * \lfield maximized_vertical The client is maximized vertically or not. * \lfield transient_for Return the client the window is transient for. + * \lfield group_id Identification unique to a group of windows. * \lfield size_hints A table with size hints of the client: user_position, * user_size, program_position and program_size. */ @@ -1600,6 +1601,12 @@ luaA_client_index(lua_State *L) case A_TK_FULLSCREEN: lua_pushboolean(L, (*c)->isfullscreen); break; + case A_TK_GROUP_ID: + if((*c)->group_win) + lua_pushnumber(L, (*c)->group_win); + else + return 0; + break; case A_TK_MAXIMIZED_HORIZONTAL: lua_pushboolean(L, (*c)->ismaxhoriz); break; diff --git a/common/tokenize.gperf b/common/tokenize.gperf index c47bbf61..cb7a362a 100644 --- a/common/tokenize.gperf +++ b/common/tokenize.gperf @@ -28,6 +28,7 @@ font fullscreen gap geometry +group_id grow height hide diff --git a/property.c b/property.c index a646a395..b641a8b3 100644 --- a/property.c +++ b/property.c @@ -192,6 +192,9 @@ property_update_wm_hints(client_t *c, xcb_get_property_reply_t *reply) if(wmh.flags & XCB_WM_HINT_INPUT) c->nofocus = !wmh.input; + + if(wmh.flags & XCB_WM_HINT_WINDOW_GROUP) + c->group_win = wmh.window_group; } static int diff --git a/structs.h b/structs.h index cb6dbe21..b61d5c7e 100644 --- a/structs.h +++ b/structs.h @@ -203,6 +203,8 @@ struct client_t window_type_t type; /** Window of the client */ xcb_window_t win; + /** Window of the group leader */ + xcb_window_t group_win; /** Client logical screen */ int screen; /** Client physical screen */