ewmh: Support all known non-override redirect window types.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Maarten Maathuis 2008-11-30 01:47:24 +01:00 committed by Julien Danjou
parent b779fa1c4c
commit d7f92fdf9f
4 changed files with 32 additions and 2 deletions

View File

@ -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;

View File

@ -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

11
ewmh.c
View File

@ -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);

View File

@ -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 */