[Xfce4-commits] <xfce4-panel:master> Fix if statement in xfce_tasklist_button_visible().

Jannis Pohlmann noreply at xfce.org
Sun Dec 5 15:22:01 CET 2010


Updating branch refs/heads/master
         to 834d2e8034834e1d57c76293021d642faed877e7 (commit)
       from d4d0cb7d7fd2dfbc1bf7ce95e2011d9f6dc46383 (commit)

commit 834d2e8034834e1d57c76293021d642faed877e7
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Sun Dec 5 15:19:04 2010 +0100

    Fix if statement in xfce_tasklist_button_visible().
    
    && binds stronger than ? and :, so if you have
    
      foo && bar ? x : y
    
    "foo && bar" will be evaluated first and if that's FALSE, y will
    be executed. In this case we want
    
      foo && (bar ? x : y)

 plugins/tasklist/tasklist-widget.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 0538719..5e50f86 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -1963,9 +1963,9 @@ xfce_tasklist_button_visible (XfceTasklistChild *child,
 
   if (child->tasklist->all_workspaces
       || (active_ws != NULL
-          && G_UNLIKELY (wnck_workspace_is_virtual (active_ws))
-             ? wnck_window_is_in_viewport (child->window, active_ws)
-             : wnck_window_is_on_workspace (child->window, active_ws)))
+          && (G_UNLIKELY (wnck_workspace_is_virtual (active_ws))
+              ? wnck_window_is_in_viewport (child->window, active_ws)
+              : wnck_window_is_on_workspace (child->window, active_ws))))
     {
       return (!child->tasklist->only_minimized
               || wnck_window_is_minimized (child->window));



More information about the Xfce4-commits mailing list