summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-09-23 11:54:34 +0200
committerBenjamin Otte <otte@redhat.com>2010-09-26 15:11:46 +0200
commit92732ffea05bef7acfaba7f005f70e829993e437 (patch)
tree18f7e5a0f5306cc4d0851480d3cf207e69d3d46c /gtk/gtknotebook.c
parentbd4545c03a04e6dc7ca36bcaa0033dd195d3b095 (diff)
downloadgtk+-92732ffea05bef7acfaba7f005f70e829993e437.tar.gz
notebook: Use gtk_cairo_transform_to_window()
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r--gtk/gtknotebook.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 00412f229d..207aff5cef 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2296,7 +2296,8 @@ gtk_notebook_draw (GtkWidget *widget,
if (priv->operation == DRAG_OPERATION_REORDER &&
gtk_cairo_should_draw_window (cr, priv->drag_window))
{
- int x, y;
+ cairo_save (cr);
+ gtk_cairo_transform_to_window (cr, widget, priv->drag_window);
/* FIXME: This is a workaround to make tabs reordering work better
* with engines with rounded tabs. If the drag window background
@@ -2305,10 +2306,6 @@ gtk_notebook_draw (GtkWidget *widget,
* Ideally, these corners should be made transparent, Either by using
* ARGB visuals or shape windows.
*/
- cairo_save (cr);
- gdk_window_get_position (priv->drag_window, &x, &y);
- cairo_translate (cr, x - allocation.x, y - allocation.y);
-
gdk_cairo_set_source_color (cr, &gtk_widget_get_style (widget)->bg [GTK_STATE_NORMAL]);
cairo_paint (cr);