Implement urgency flag matcher

Currently it supports the following options:
"oldest": match the first window that triggered an urgent event
"latest": match the last window that triggered an urgent event
This commit is contained in:
Jeremy O'Brien
2012-01-24 18:00:27 -05:00
committed by Michael Stapelberg
parent 23abfcf7f2
commit 53541817ef
8 changed files with 84 additions and 0 deletions

View File

@ -841,12 +841,20 @@ static bool handle_hints(void *data, xcb_connection_t *conn, uint8_t state, xcb_
if (!con->urgent && focused == con) {
DLOG("Ignoring urgency flag for current client\n");
con->window->urgent = 0;
goto end;
}
/* Update the flag on the client directly */
con->urgent = (xcb_icccm_wm_hints_get_urgency(&hints) != 0);
//CLIENT_LOG(con);
if (con->window) {
if (con->urgent) {
con->window->urgent = time(NULL);
} else {
con->window->urgent = 0;
}
}
LOG("Urgency flag changed to %d\n", con->urgent);
Con *ws;