From fd0689035434c772bfb75cb6b89a70ae0c484d30 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 5 Dec 2011 21:13:50 +0100 Subject: [PATCH] notebook: Make the tab reordering dnd window transparent --- gtk/gtknotebook.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 7fce619d97..714f90d7d2 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -2625,22 +2625,9 @@ gtk_notebook_draw (GtkWidget *widget, gtk_cairo_should_draw_window (cr, priv->drag_window)) { GtkStyleContext *context; - GdkRGBA bg_color; cairo_save (cr); gtk_cairo_transform_to_window (cr, widget, priv->drag_window); - context = gtk_widget_get_style_context (widget); - - /* FIXME: This is a workaround to make tabs reordering work better - * with engines with rounded tabs. If the drag window background - * isn't set, the rounded corners would be black. - * - * Ideally, these corners should be made transparent, Either by using - * ARGB visuals or shape windows. - */ - gtk_style_context_get_background_color (context, 0, &bg_color); - gdk_cairo_set_source_rgba (cr, &bg_color); - cairo_paint (cr); gtk_notebook_draw_tab (notebook, priv->cur_page, @@ -3112,6 +3099,7 @@ show_drag_window (GtkNotebook *notebook, { GdkWindowAttr attributes; guint attributes_mask; + GdkRGBA transparent = {0, 0, 0, 0}; attributes.x = page->allocation.x; attributes.y = page->allocation.y; @@ -3127,6 +3115,7 @@ show_drag_window (GtkNotebook *notebook, &attributes, attributes_mask); gdk_window_set_user_data (priv->drag_window, widget); + gdk_window_set_background_rgba (priv->drag_window, &transparent); } g_object_ref (page->tab_label);