make pager popups only trigger on urgency hint if client is not currently visible
authorMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 6 Jul 2015 16:45:03 +0000 (12:45 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 6 Jul 2015 16:47:00 +0000 (12:47 -0400)
the annoyance of having this popup constantly triggered while a window is visible
cannot be understated.

src/modules/pager/e_mod_main.c
src/modules/pager_plain/e_mod_main.c

index 841a011..6f99346 100644 (file)
@@ -1052,7 +1052,8 @@ _pager_cb_event_client_urgent_change(void *data EINA_UNUSED, int type EINA_UNUSE
 {
    if (!(ev->property & E_CLIENT_PROPERTY_URGENCY)) return ECORE_CALLBACK_RENEW;
 
-   if (pager_config->popup_urgent && (pager_config->popup_urgent_focus ||
+   if (pager_config->popup_urgent && (!e_client_util_desk_visible(ev->ec, e_desk_current_get(ev->ec->zone))) &&
+                                      (pager_config->popup_urgent_focus ||
                                       (!pager_config->popup_urgent_focus && (!ev->ec->focused) && (!ev->ec->want_focus))))
      {
         Pager_Popup *pp;
index dd81015..43940f3 100644 (file)
@@ -1412,7 +1412,8 @@ _pager_cb_event_client_urgent_change(void *data EINA_UNUSED, int type EINA_UNUSE
    zone = ev->ec->zone;
    urgent = ev->ec->urgent || ev->ec->icccm.urgent;
 
-   if (pager_config->popup_urgent && (pager_config->popup_urgent_focus ||
+   if (pager_config->popup_urgent && (!e_client_util_desk_visible(ev->ec, e_desk_current_get(ev->ec->zone))) &&
+                                      (pager_config->popup_urgent_focus ||
                                       ((!pager_config->popup_urgent_focus) && (!ev->ec->focused) && (!ev->ec->want_focus))))
      {
         pp = _pager_popup_find(zone);