[Xfce4-commits] <xfce4-panel:devel> Only start blinking non-active windows.

Nick Schermer noreply at xfce.org
Sat Nov 28 21:02:03 CET 2009


Updating branch refs/heads/devel
         to 30821f2df2b48e042274dd33a5ac217b2eb66251 (commit)
       from 97a6591473fcbdc2abac834cce91603c2bcbbfcd (commit)

commit 30821f2df2b48e042274dd33a5ac217b2eb66251
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Nov 28 18:07:44 2009 +0100

    Only start blinking non-active windows.

 plugins/tasklist/tasklist-widget.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index b2cf579..41f044d 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -1311,6 +1311,10 @@ tasklist_button_state_changed (WnckWindow        *window,
                                WnckWindowState    new_state,
                                XfceTasklistChild *child)
 {
+  gboolean blink;
+
+  panel_return_if_fail (child->window == window);
+
   /* update the button name */
   if (PANEL_HAS_FLAG (changed_state, WNCK_WINDOW_STATE_SHADED | WNCK_WINDOW_STATE_MINIMIZED)
       && !child->tasklist->only_minimized)
@@ -1336,8 +1340,13 @@ tasklist_button_state_changed (WnckWindow        *window,
   /* update the blinking state */
   if (PANEL_HAS_FLAG (changed_state, WNCK_WINDOW_STATE_DEMANDS_ATTENTION)
       || PANEL_HAS_FLAG (changed_state, WNCK_WINDOW_STATE_URGENT))
-    xfce_arrow_button_set_blinking (XFCE_ARROW_BUTTON (child->button),
-        wnck_window_or_transient_needs_attention (child->window));
+    {
+      /* only start blinking if the window requesting urgentcy
+       * notification is not the active window */
+      blink = wnck_window_or_transient_needs_attention (window);
+      if (!blink || (blink && !wnck_window_is_active (window)))
+        xfce_arrow_button_set_blinking (XFCE_ARROW_BUTTON (child->button), blink);
+    }
 }
 
 



More information about the Xfce4-commits mailing list