[Xfce4-commits] <xfce4-taskbar-plugin:master> Minor tweaks, wnck sub-windows are untable for some reason...

Gearoid Murphy noreply at xfce.org
Wed Oct 10 18:56:01 CEST 2012


Updating branch refs/heads/master
         to fce21021c37133d9ad26ab7f0bfa2d4a7f341bb3 (commit)
       from cce5b5e9b27f4e057ab50d1f57c88afe0861d4f3 (commit)

commit fce21021c37133d9ad26ab7f0bfa2d4a7f341bb3
Author: Gearoid Murphy <gearoid.murphy at hp.com>
Date:   Wed Oct 10 17:52:14 2012 +0100

    Minor tweaks, wnck sub-windows are untable for some reason...

 taskbar-widget.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/taskbar-widget.c b/taskbar-widget.c
index 1a3be0a..1f69bf9 100644
--- a/taskbar-widget.c
+++ b/taskbar-widget.c
@@ -187,10 +187,10 @@ struct _XfceTaskBarGroup
     gboolean      dragactive ;
     gboolean      pinned ;
     gchar         *command ;
-    guint         popup_timeout ;
+    guint         hover_timeout ;
 };
 
-#define DISABLE_HOVER_TIMEOUT(group) if(group->popup_timeout != 0) {g_source_remove(group->popup_timeout); group->popup_timeout=0;}
+#define DISABLE_HOVER_TIMEOUT(group) if(group->hover_timeout != 0) {g_source_remove(group->hover_timeout); group->hover_timeout=0;}
 
 static const GtkTargetEntry source_targets[] =
 {
@@ -1611,7 +1611,7 @@ static gboolean xfce_taskbar_app_button_release_event (GtkWidget *button, GdkEve
             return FALSE ;
         }
     }
-    else// if(event->button == 3)
+    else// if(event->button == RIGHTMOUSE)
     {
         GtkWidget *menu ;
         menu = wnck_action_menu_new (child->window); g_signal_connect (G_OBJECT (menu), "selection-done", G_CALLBACK (gtk_widget_destroy), NULL);
@@ -2466,7 +2466,6 @@ static gboolean xfce_taskbar_group_button_hover_timeout(gpointer group_ptr)
 //Triggered when the mouse exits the group button icon
 static gboolean xfce_taskbar_group_button_leave_event(GtkWidget *button, GdkEvent *event, XfceTaskBarGroup *group)
 {
-    //printf("xfce_taskbar_group_button_leave_event\n");
     DISABLE_HOVER_TIMEOUT(group);
     return FALSE ;
 }
@@ -2474,12 +2473,10 @@ static gboolean xfce_taskbar_group_button_leave_event(GtkWidget *button, GdkEven
 //Triggered when the mouse enters the group button icon
 static gboolean xfce_taskbar_group_button_enter_event(GtkWidget *button, GdkEvent *event, XfceTaskBarGroup *group)
 {
-    //printf("xfce_taskbar_group_button_enter_event\n");
     if(xfce_taskbar_group_visible_count(group, wnck_screen_get_active_workspace (group->taskbar->screen)) > 0)
     {
-        group->popup_timeout = g_timeout_add(250, xfce_taskbar_group_button_hover_timeout, group);
+        group->hover_timeout = g_timeout_add(250, xfce_taskbar_group_button_hover_timeout, group);
     }
-    
     return TRUE ;
 }
 
@@ -2607,7 +2604,7 @@ static XfceTaskBarGroup * xfce_taskbar_group_button_new (const char *group_name,
     group->command = NULL ;
     
     //The timeout id, used when tracking a mouse hovering over the button
-    group->popup_timeout = 0 ;
+    group->hover_timeout = 0 ;
     
     group->button = xfce_arrow_button_new (GTK_ARROW_NONE);
     gtk_widget_set_parent (group->button, GTK_WIDGET (taskbar));


More information about the Xfce4-commits mailing list