diff --git a/client.c b/client.c index 0f310da1..37a9600c 100644 --- a/client.c +++ b/client.c @@ -347,6 +347,9 @@ client_layer_translator(client_t *c) case WINDOW_TYPE_DESKTOP: return LAYER_DESKTOP; case WINDOW_TYPE_DIALOG: + case WINDOW_TYPE_MENU: + case WINDOW_TYPE_TOOLBAR: + case WINDOW_TYPE_UTILITY: return LAYER_FLOAT; default: break; @@ -1586,6 +1589,15 @@ luaA_client_index(lua_State *L) case WINDOW_TYPE_DIALOG: lua_pushliteral(L, "dialog"); break; + case WINDOW_TYPE_MENU: + lua_pushliteral(L, "menu"); + break; + case WINDOW_TYPE_TOOLBAR: + lua_pushliteral(L, "toolbar"); + break; + case WINDOW_TYPE_UTILITY: + lua_pushliteral(L, "utility"); + break; default: lua_pushliteral(L, "normal"); break; diff --git a/common/atoms.list b/common/atoms.list index c8475dea..6ab239d2 100644 --- a/common/atoms.list +++ b/common/atoms.list @@ -15,11 +15,14 @@ _NET_WM_DESKTOP _NET_WM_ICON_NAME _NET_WM_VISIBLE_ICON_NAME _NET_WM_WINDOW_TYPE -_NET_WM_WINDOW_TYPE_NORMAL _NET_WM_WINDOW_TYPE_DESKTOP _NET_WM_WINDOW_TYPE_DOCK +_NET_WM_WINDOW_TYPE_TOOLBAR +_NET_WM_WINDOW_TYPE_MENU +_NET_WM_WINDOW_TYPE_UTILITY _NET_WM_WINDOW_TYPE_SPLASH _NET_WM_WINDOW_TYPE_DIALOG +_NET_WM_WINDOW_TYPE_NORMAL _NET_WM_ICON _NET_WM_PID _NET_WM_STATE diff --git a/ewmh.c b/ewmh.c index 633261e1..a4c241da 100644 --- a/ewmh.c +++ b/ewmh.c @@ -63,11 +63,14 @@ ewmh_init(int phys_screen) _NET_WM_VISIBLE_ICON_NAME, _NET_WM_DESKTOP, _NET_WM_WINDOW_TYPE, - _NET_WM_WINDOW_TYPE_NORMAL, _NET_WM_WINDOW_TYPE_DESKTOP, _NET_WM_WINDOW_TYPE_DOCK, + _NET_WM_WINDOW_TYPE_TOOLBAR, + _NET_WM_WINDOW_TYPE_MENU, + _NET_WM_WINDOW_TYPE_UTILITY, _NET_WM_WINDOW_TYPE_SPLASH, _NET_WM_WINDOW_TYPE_DIALOG, + _NET_WM_WINDOW_TYPE_NORMAL, _NET_WM_ICON, _NET_WM_PID, _NET_WM_STATE, @@ -497,6 +500,12 @@ ewmh_client_check_hints(client_t *c) c->type = MAX(c->type, WINDOW_TYPE_SPLASH); else if(state[i] == _NET_WM_WINDOW_TYPE_DOCK) c->type = MAX(c->type, WINDOW_TYPE_DOCK); + else if(state[i] == _NET_WM_WINDOW_TYPE_MENU) + c->type = MAX(c->type, WINDOW_TYPE_MENU); + else if(state[i] == _NET_WM_WINDOW_TYPE_TOOLBAR) + c->type = MAX(c->type, WINDOW_TYPE_TOOLBAR); + else if(state[i] == _NET_WM_WINDOW_TYPE_UTILITY) + c->type = MAX(c->type, WINDOW_TYPE_UTILITY); } p_delete(&reply); diff --git a/structs.h b/structs.h index 864f4459..a0eed2e6 100644 --- a/structs.h +++ b/structs.h @@ -42,6 +42,12 @@ typedef enum WINDOW_TYPE_DOCK, WINDOW_TYPE_SPLASH, WINDOW_TYPE_DIALOG, + /* The ones below may have TRANSIENT_FOR, but are not plain dialogs. + * They were purposefully placed below DIALOG. + */ + WINDOW_TYPE_MENU, + WINDOW_TYPE_TOOLBAR, + WINDOW_TYPE_UTILITY } window_type_t; /** Wibox types */