+ if (match->window_type != UINT32_MAX) {
+ if (window->window_type == match->window_type) {
+ LOG("window_type matches (%i)\n", match->window_type);
+ } else {
+ return false;
+ }
+ }
+
+ Con *con = NULL;
+ if (match->urgent == U_LATEST) {
+ /* if the window isn't urgent, no sense in searching */
+ if (window->urgent.tv_sec == 0) {
+ return false;
+ }
+ /* if we find a window that is newer than this one, bail */
+ TAILQ_FOREACH(con, &all_cons, all_cons) {
+ if ((con->window != NULL) &&
+ _i3_timercmp(con->window->urgent, window->urgent, > )) {
+ return false;
+ }
+ }
+ LOG("urgent matches latest\n");
+ }
+
+ if (match->urgent == U_OLDEST) {
+ /* if the window isn't urgent, no sense in searching */
+ if (window->urgent.tv_sec == 0) {
+ return false;
+ }
+ /* if we find a window that is older than this one (and not 0), bail */
+ TAILQ_FOREACH(con, &all_cons, all_cons) {
+ if ((con->window != NULL) &&
+ (con->window->urgent.tv_sec != 0) &&
+ _i3_timercmp(con->window->urgent, window->urgent, < )) {
+ return false;
+ }
+ }
+ LOG("urgent matches oldest\n");
+ }
+
+ if (match->dock != M_DONTCHECK) {