Index: client.c =================================================================== --- client.c (revision 28010) +++ client.c (working copy) @@ -345,14 +345,22 @@ { Client *c; - TRACE ("entering urgent_cb"); + TRACE ("entering urgent_cb, iteration %i", c->blink_iterations); c = (Client *) data; if (c != clientGetFocus ()) { - FLAG_TOGGLE (c->xfwm_flags, XFWM_FLAG_SEEN_ACTIVE); - frameQueueDraw (c, FALSE); + if (c->blink_iterations < MAX_BLINK_ITERATIONS) + { + c->blink_iterations++; + FLAG_TOGGLE (c->xfwm_flags, XFWM_FLAG_SEEN_ACTIVE); + frameQueueDraw (c, FALSE); + } } + else if (c->blink_iterations) + { + c->blink_iterations = 0; + } return (TRUE); } @@ -372,6 +380,7 @@ FLAG_UNSET (c->wm_flags, WM_FLAG_URGENT); c->blink_timeout_id = 0; + c->blink_iterations = 0; if ((c->wmhints) && (c->wmhints->flags & XUrgencyHint)) { FLAG_SET (c->wm_flags, WM_FLAG_URGENT); @@ -1639,6 +1648,9 @@ c->opacity_applied = c->opacity; c->opacity_flags = 0; + /* Keep count of blinking iterations */ + c->blink_iterations = 0; + if (getOpacityLock (display_info, c->window)) { FLAG_SET (c->xfwm_flags, XFWM_FLAG_OPACITY_LOCKED); Index: client.h =================================================================== --- client.h (revision 28010) +++ client.h (working copy) @@ -102,13 +102,17 @@ #endif #ifndef CLIENT_BLINK_TIMEOUT -#define CLIENT_BLINK_TIMEOUT 500 /* ms */ +#define CLIENT_BLINK_TIMEOUT 500 /* ms */ #endif #ifndef CLIENT_PING_TIMEOUT #define CLIENT_PING_TIMEOUT 3000 /* ms */ #endif +#ifndef MAX_BLINK_ITERATIONS +#define MAX_BLINK_ITERATIONS 20 /* Keep that even */ +#endif + #define XFWM_FLAG_HAS_BORDER (1L<<0) #define XFWM_FLAG_HAS_MENU (1L<<1) #define XFWM_FLAG_HAS_MAXIMIZE (1L<<2) @@ -286,6 +290,7 @@ int previous_height; int initial_layer; int ncmap; + int blink_iterations; int button_status[BUTTON_COUNT]; int struts[STRUTS_SIZE]; gchar *hostname;