File gnome-panel-transparency.patch of Package gnome-panel-nld
--- applets/notification_area/eggtraymanager.c
+++ applets/notification_area/eggtraymanager.c
@@ -278,6 +278,36 @@
return FALSE;
}
+static gboolean
+transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
+{
+ gdk_window_clear_area (widget->window, event->area.x, event->area.y,
+ event->area.width, event->area.height);
+ return FALSE;
+}
+
+static void
+make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
+ gpointer user_data)
+{
+ gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+}
+
+static void
+make_transparent (GtkWidget *widget, gpointer user_data)
+{
+ if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
+ return;
+
+ gtk_widget_set_app_paintable (widget, TRUE);
+ gtk_widget_set_double_buffered (widget, FALSE);
+ gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+ g_signal_connect (widget, "expose_event",
+ G_CALLBACK (transparent_expose_event), NULL);
+ g_signal_connect_after (widget, "style_set",
+ G_CALLBACK (make_transparent_again), NULL);
+}
+
static void
egg_tray_manager_handle_dock_request (EggTrayManager *manager,
XClientMessageEvent *xevent)
@@ -286,6 +316,8 @@
Window *window;
socket = gtk_socket_new ();
+ g_signal_connect (socket, "realize",
+ G_CALLBACK (make_transparent), NULL);
/* We need to set the child window here
* so that the client can call _get functions
--- applets/notification_area/main.c
+++ applets/notification_area/main.c
@@ -160,13 +160,23 @@
gtk_box_pack_end (GTK_BOX (tray->box), icon, FALSE, FALSE, 0);
+ gtk_widget_hide (tray->box);
gtk_widget_show (icon);
+ gtk_widget_show (tray->box);
}
static void
tray_removed (EggTrayManager *manager, GtkWidget *icon, void *data)
{
+ SystemTray *tray;
+
+ if (all_trays == NULL)
+ return;
+
+ tray = all_trays->data;
+ gtk_widget_hide (tray->box);
+ gtk_widget_show (tray->box);
}
static void
@@ -271,6 +281,13 @@
g_object_unref (style);
break;
}
+
+ /* Force the icons to redraw their backgrounds.
+ * gtk_widget_queue_draw() doesn't work across process boundaries,
+ * so we do this instead.
+ */
+ gtk_widget_hide (tray->box);
+ gtk_widget_show (tray->box);
}
static void
--- gnome-panel/panel-background.c
+++ gnome-panel/panel-background.c
@@ -532,6 +532,8 @@
background->image, error->message);
g_error_free (error);
}
+
+ panel_background_update_has_alpha (background);
}
void
@@ -638,8 +640,6 @@
if (image && image [0])
background->image = g_strdup (image);
-
- panel_background_update_has_alpha (background);
}
void