Merge pull request #2909 from makepanic/issues/2906

Parse missing i3 window types
This commit is contained in:
Drew DeVault 2018-10-21 16:40:53 +02:00 committed by GitHub
commit 429787510e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

View file

@ -10,6 +10,11 @@ enum atom_name {
NET_WM_WINDOW_TYPE_UTILITY,
NET_WM_WINDOW_TYPE_TOOLBAR,
NET_WM_WINDOW_TYPE_SPLASH,
NET_WM_WINDOW_TYPE_MENU,
NET_WM_WINDOW_TYPE_DROPDOWN_MENU,
NET_WM_WINDOW_TYPE_POPUP_MENU,
NET_WM_WINDOW_TYPE_TOOLTIP,
NET_WM_WINDOW_TYPE_NOTIFICATION,
NET_WM_STATE_MODAL,
ATOM_LAST,
};

View file

@ -286,6 +286,16 @@ static enum atom_name parse_window_type(const char *type) {
return NET_WM_WINDOW_TYPE_TOOLBAR;
} else if (strcasecmp(type, "splash") == 0) {
return NET_WM_WINDOW_TYPE_SPLASH;
} else if (strcasecmp(type, "menu") == 0) {
return NET_WM_WINDOW_TYPE_MENU;
} else if (strcasecmp(type, "dropdown_menu") == 0) {
return NET_WM_WINDOW_TYPE_DROPDOWN_MENU;
} else if (strcasecmp(type, "popup_menu") == 0) {
return NET_WM_WINDOW_TYPE_POPUP_MENU;
} else if (strcasecmp(type, "tooltip") == 0) {
return NET_WM_WINDOW_TYPE_TOOLTIP;
} else if (strcasecmp(type, "notification") == 0) {
return NET_WM_WINDOW_TYPE_NOTIFICATION;
}
return ATOM_LAST; // ie. invalid
}

View file

@ -23,6 +23,11 @@ static const char *atom_map[ATOM_LAST] = {
"_NET_WM_WINDOW_TYPE_UTILITY",
"_NET_WM_WINDOW_TYPE_TOOLBAR",
"_NET_WM_WINDOW_TYPE_SPLASH",
"_NET_WM_WINDOW_TYPE_MENU",
"_NET_WM_WINDOW_TYPE_DROPDOWN_MENU",
"_NET_WM_WINDOW_TYPE_POPUP_MENU",
"_NET_WM_WINDOW_TYPE_TOOLTIP",
"_NET_WM_WINDOW_TYPE_NOTIFICATION",
"_NET_WM_STATE_MODAL",
};