diff options
Diffstat (limited to '0001-New-tooltip-style.patch')
-rw-r--r-- | 0001-New-tooltip-style.patch | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/0001-New-tooltip-style.patch b/0001-New-tooltip-style.patch index 58ebdb7..63723cf 100644 --- a/0001-New-tooltip-style.patch +++ b/0001-New-tooltip-style.patch @@ -1,6 +1,6 @@ diff -up gtk+-2.91.0/gtk/gtktooltip.c.fresh-tooltips gtk+-2.91.0/gtk/gtktooltip.c --- gtk+-2.91.0/gtk/gtktooltip.c.fresh-tooltips 2010-09-27 20:40:00.000000000 -0400 -+++ gtk+-2.91.0/gtk/gtktooltip.c 2010-10-02 01:31:34.469456006 -0400 ++++ gtk+-2.91.0/gtk/gtktooltip.c 2010-10-02 17:39:21.748134000 -0400 @@ -35,6 +35,9 @@ #include "gtkalignment.h" #include "gtksizerequest.h" @@ -87,7 +87,7 @@ diff -up gtk+-2.91.0/gtk/gtktooltip.c.fresh-tooltips gtk+-2.91.0/gtk/gtktooltip. tooltip->custom_widget = NULL; } -@@ -517,19 +566,210 @@ gtk_tooltip_window_style_set (GtkTooltip +@@ -517,19 +566,211 @@ gtk_tooltip_window_style_set (GtkTooltip gtk_widget_queue_draw (tooltip->window); } @@ -192,8 +192,9 @@ diff -up gtk+-2.91.0/gtk/gtktooltip.c.fresh-tooltips gtk+-2.91.0/gtk/gtktooltip. +update_shape (GtkTooltip *tooltip) +{ + GdkScreen *screen; -+ GdkBitmap *mask; + cairo_t *cr; ++ cairo_surface_t *surface; ++ cairo_region_t *region; + gint width, height; + gboolean new_style; + gint radius; @@ -203,7 +204,7 @@ diff -up gtk+-2.91.0/gtk/gtktooltip.c.fresh-tooltips gtk+-2.91.0/gtk/gtktooltip. + + if (!new_style) + { -+ gtk_widget_shape_combine_mask (tooltip->window, NULL, 0, 0); ++ gtk_widget_shape_combine_region (tooltip->window, NULL); + return; + } + @@ -216,7 +217,7 @@ diff -up gtk+-2.91.0/gtk/gtktooltip.c.fresh-tooltips gtk+-2.91.0/gtk/gtktooltip. + { + const char *wm; + -+ gtk_widget_shape_combine_mask (tooltip->window, NULL, 0, 0); ++ gtk_widget_shape_combine_region (tooltip->window, NULL); +#ifdef GDK_WINDOWING_X11 + /* This is a hack to keep the Metacity compositor from slapping a + * non-shaped shadow around the shaped tooltip @@ -234,8 +235,8 @@ diff -up gtk+-2.91.0/gtk/gtktooltip.c.fresh-tooltips gtk+-2.91.0/gtk/gtktooltip. + + radius = MIN (style->xthickness, style->ythickness); + radius = MAX (radius, 1); -+ mask = (GdkBitmap *) gdk_pixmap_new (NULL, width, height, 1); -+ cr = gdk_cairo_create (mask); ++ surface = cairo_image_surface_create (CAIRO_FORMAT_A8, width, height); ++ cr = cairo_create (surface); + if (cairo_status (cr) == CAIRO_STATUS_SUCCESS) + { + cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); @@ -245,12 +246,12 @@ diff -up gtk+-2.91.0/gtk/gtktooltip.c.fresh-tooltips gtk+-2.91.0/gtk/gtktooltip. + cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); + draw_round_rect (cr, 1.0, 0, 0, radius + 1, width, height); + cairo_fill (cr); -+ -+ gtk_widget_shape_combine_mask (tooltip->window, mask, 0, 0); ++ region = gdk_cairo_region_create_from_surface (surface); ++ gtk_widget_shape_combine_region (tooltip->window, region); ++ cairo_region_destroy (region); + } + cairo_destroy (cr); -+ -+ g_object_unref (mask); ++ cairo_surface_destroy (surface); +} + static gboolean |