Author: nick
Date: 2007-10-28 19:18:22 +0000 (Sun, 28 Oct 2007)
New Revision: 26212

Modified:
   xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c
   xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c
Log:
* Another attempt to fix tray icons.


Modified: xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c
===================================================================
--- xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c       2007-10-28 
17:14:34 UTC (rev 26211)
+++ xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c       2007-10-28 
19:18:22 UTC (rev 26212)
@@ -739,7 +739,6 @@
 
 
 
-
 static void
 xfce_tray_manager_handle_dock_request (XfceTrayManager     *manager,
                                        XClientMessageEvent *xevent)
@@ -756,6 +755,7 @@
 
     /* allow applications to draw on this widget */
     gtk_widget_set_app_paintable (socket, TRUE);
+    gtk_widget_set_double_buffered (socket, FALSE);
 
     /* allocate and set the xwindow */
     xwindow = g_new (Window, 1);

Modified: xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c
===================================================================
--- xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c        2007-10-28 
17:14:34 UTC (rev 26211)
+++ xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c        2007-10-28 
19:18:22 UTC (rev 26212)
@@ -227,10 +227,15 @@
                                GdkEventExpose *event)
 {
     XfceTrayWidget *tray = XFCE_TRAY_WIDGET (widget);
+    GSList         *li;
 
     /* expose the button, because it doesn't have its own window */
     gtk_container_propagate_expose (GTK_CONTAINER (widget), tray->button, 
event);
 
+    /* do a reallocate to the tray icons */
+    for (li = tray->childeren; li != NULL; li = li->next)
+        gtk_widget_size_allocate (li->data, &GTK_WIDGET 
(li->data)->allocation);
+
     return FALSE;
 }
 
@@ -437,6 +442,8 @@
     _panel_return_if_fail (XFCE_IS_TRAY_MANAGER (manager));
     _panel_return_if_fail (XFCE_IS_TRAY_WIDGET (tray));
     _panel_return_if_fail (GTK_IS_WIDGET (icon));
+    _panel_return_if_fail (GTK_WIDGET_DRAWABLE (tray));
+    _panel_return_if_fail (GTK_WIDGET_DRAWABLE (icon));
 
     /* add the icon to the list */
     tray->childeren = g_slist_insert_sorted (tray->childeren, icon, 
xfce_tray_widget_compare_function);
@@ -633,6 +640,8 @@
         /* get the child */
         child = li->data;
 
+        _panel_return_val_if_fail (GTK_WIDGET_REALIZED (child), FALSE);
+
         if (!tray->all_visible && i < tray->n_hidden_childeren)
         {
             child_allocation.x = child_allocation.y = 
XFCE_TRAY_WIDGET_OFFSCREEN;

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to