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

@ -304,6 +304,9 @@ struct Window {
/** Whether the application needs to receive WM_TAKE_FOCUS */
bool needs_take_focus;
/** When this window was marked urgent. 0 means not urgent */
time_t urgent;
/** Whether this window accepts focus. We store this inverted so that the
* default will be 'accepts focus'. */
bool doesnt_accept_focus;
@ -335,6 +338,11 @@ struct Match {
struct regex *instance;
struct regex *mark;
struct regex *role;
enum {
U_DONTCHECK = -1,
U_LATEST = 0,
U_OLDEST = 1
} urgent;
enum {
M_DONTCHECK = -1,
M_NODOCK = 0,