diff --git a/client.c b/client.c index e61ccaf6..2e91aab3 100644 --- a/client.c +++ b/client.c @@ -55,6 +55,7 @@ luaA_client_gc(lua_State *L) button_array_wipe(&c->buttons); image_unref(L, c->icon); p_delete(&c->class); + p_delete(&c->startup_id); p_delete(&c->instance); p_delete(&c->icon_name); p_delete(&c->name); @@ -515,6 +516,8 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int phys_screen, property_update_wm_icon_name(c); property_update_wm_class(c); + xutil_text_prop_get(globalconf.connection, c->win, _NET_STARTUP_ID, &c->startup_id, NULL); + /* update strut */ ewmh_process_client_strut(c, NULL); diff --git a/common/atoms.list b/common/atoms.list index 596f1bd8..22656e12 100644 --- a/common/atoms.list +++ b/common/atoms.list @@ -1,4 +1,5 @@ _NET_SUPPORTED +_NET_STARTUP_ID _NET_CLIENT_LIST _NET_CLIENT_LIST_STACKING _NET_NUMBER_OF_DESKTOPS diff --git a/ewmh.c b/ewmh.c index aa58ecd2..2435c3e9 100644 --- a/ewmh.c +++ b/ewmh.c @@ -65,6 +65,7 @@ ewmh_init(int phys_screen) { _NET_SUPPORTED, _NET_SUPPORTING_WM_CHECK, + _NET_STARTUP_ID, _NET_CLIENT_LIST, _NET_CLIENT_LIST_STACKING, _NET_NUMBER_OF_DESKTOPS, diff --git a/structs.h b/structs.h index 099bfc89..f24cb1cc 100644 --- a/structs.h +++ b/structs.h @@ -168,6 +168,8 @@ struct client_t char *name, *icon_name; /** WM_CLASS stuff */ char *class, *instance; + /** Startup ID */ + char *startup_id; /** Window geometry */ area_t geometry; struct