From eead324684bb761545d755b5c55913d33b9e7a81 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 2 Oct 2008 14:07:42 +0200 Subject: [PATCH] ewmh: order WINDOW_TYPE Some windows might have several types, so takes the highest. --- ewmh.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ewmh.c b/ewmh.c index ebeeae6e9..07eeb7006 100644 --- a/ewmh.c +++ b/ewmh.c @@ -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);