ewmh: order WINDOW_TYPE

Some windows might have several types, so takes the highest.
This commit is contained in:
Julien Danjou 2008-10-02 14:07:42 +02:00
parent 45f7029fb9
commit eead324684

10
ewmh.c
View file

@ -469,15 +469,13 @@ ewmh_client_check_hints(client_t *c)
state = (xcb_atom_t *) data;
for(int i = 0; i < xcb_get_property_value_length(reply); i++)
if(state[i] == _NET_WM_WINDOW_TYPE_DESKTOP)
c->type = WINDOW_TYPE_DESKTOP;
c->type = MAX(c->type, WINDOW_TYPE_DESKTOP);
else if(state[i] == _NET_WM_WINDOW_TYPE_DIALOG)
c->type = WINDOW_TYPE_DIALOG;
c->type = MAX(c->type, WINDOW_TYPE_DIALOG);
else if(state[i] == _NET_WM_WINDOW_TYPE_SPLASH)
c->type = WINDOW_TYPE_SPLASH;
c->type = MAX(c->type, WINDOW_TYPE_SPLASH);
else if(state[i] == _NET_WM_WINDOW_TYPE_DOCK)
c->type = WINDOW_TYPE_DOCK;
else
c->type = WINDOW_TYPE_NORMAL;
c->type = MAX(c->type, WINDOW_TYPE_DOCK);
}
p_delete(&reply);