Fix urgent flag of tag when hint appears on current tag & try a new way to handle unmap event

This commit is contained in:
Martin Duquesnoy 2012-02-15 18:52:05 +01:00
parent 35ccda32a4
commit d6afd65f6f
2 changed files with 14 additions and 12 deletions

View File

@ -316,9 +316,9 @@ event_unmapnotify(XEvent *e)
struct client *c;
struct _systray *s;
if((c = client_gb_win(ev->window))
&& ev->send_event
&& ev->event == W->root)
if((c = client_gb_win(ev->window)))
{
if(!ev->send_event)
{
int d;
unsigned char *ret = NULL;
@ -329,6 +329,9 @@ event_unmapnotify(XEvent *e)
if(*ret == NormalState)
client_remove(c);
}
else
client_unmap(c);
}
else if((s = systray_find(ev->window)))
{
systray_del(s);

View File

@ -60,8 +60,7 @@ tag_screen(struct screen *s, struct tag *t)
if(!SLIST_EMPTY(&t->clients) && !(W->flags & WMFS_SCAN))
client_focus( client_tab_next(t->sel));
if(t->flags & TAG_URGENT)
t->flags ^= TAG_URGENT;
t->flags &= ~TAG_URGENT;
infobar_elem_screen_update(s, ElemTag);