1594
update_input_shape (GtkWidget* window,
1594
update_input_shape (GtkWidget* window)
1598
GdkBitmap* mask = NULL;
1601
mask = (GdkBitmap*) gdk_pixmap_new (NULL, width, height, 1);
1604
cr = gdk_cairo_create (mask);
1605
if (cairo_status (cr) == CAIRO_STATUS_SUCCESS)
1607
cairo_scale (cr, 1.0f, 1.0f);
1608
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
1610
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
1611
cairo_set_source_rgb (cr, 1.0f, 1.0f, 1.0f);
1613
// just draw something
1614
draw_round_rect (cr,
1624
gtk_widget_input_shape_combine_mask (window,
1628
gtk_widget_input_shape_combine_mask (window,
1634
g_object_unref ((gpointer) mask);
1596
GdkRegion* region = NULL;
1602
// set an empty input-mask to allow click-through
1603
region = gdk_region_new ();
1604
gdk_window_input_shape_combine_region (window->window, region, 0, 0);
1605
gdk_region_destroy (region);
1662
// guess we need one
1663
gtk_widget_get_size_request (priv->widget, &width, &height);
1664
mask = (GdkBitmap*) gdk_pixmap_new (NULL, width, height, 1);
1667
// create context from mask/pixmap
1668
cr = gdk_cairo_create (mask);
1669
if (cairo_status (cr) == CAIRO_STATUS_SUCCESS)
1632
// we're not-composited, so deal with mouse-over differently
1633
if (bubble_is_mouse_over (self))
1635
gtk_widget_hide (priv->widget);
1639
gtk_widget_show (priv->widget);
1640
gtk_widget_get_size_request (priv->widget, &width, &height);
1641
mask = (GdkBitmap*) gdk_pixmap_new (NULL, width, height, 1);
1671
// clear mask/context
1672
cairo_scale (cr, 1.0f, 1.0f);
1673
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
1676
width -= 2 * EM2PIXELS (defaults_get_bubble_shadow_size (d), d);
1677
height -= 2 * EM2PIXELS (defaults_get_bubble_shadow_size (d), d);
1679
// draw rounded rectangle shape/mask
1680
if (bubble_is_mouse_over (self))
1644
// create context from mask/pixmap
1645
cr = gdk_cairo_create (mask);
1646
if (cairo_status (cr) == CAIRO_STATUS_SUCCESS)
1648
// clear mask/context
1649
cairo_scale (cr, 1.0f, 1.0f);
1681
1650
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
1653
width -= 2 * EM2PIXELS (defaults_get_bubble_shadow_size (d), d);
1654
height -= 2 * EM2PIXELS (defaults_get_bubble_shadow_size (d), d);
1656
// draw rounded rectangle shape/mask
1683
1657
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
1684
cairo_set_source_rgb (cr, 1.0f, 1.0f, 1.0f);
1685
draw_round_rect (cr,
1658
cairo_set_source_rgb (cr, 1.0f, 1.0f, 1.0f);
1659
draw_round_rect (cr,
1687
1661
EM2PIXELS (defaults_get_bubble_shadow_size (d), d),
1688
1662
EM2PIXELS (defaults_get_bubble_shadow_size (d), d),
1689
1663
EM2PIXELS (defaults_get_bubble_corner_radius (d), d),
1693
/*if (bubble_is_mouse_over (self))
1695
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
1699
2 + EM2PIXELS (defaults_get_bubble_shadow_size (d), d),
1700
2 + EM2PIXELS (defaults_get_bubble_shadow_size (d), d),
1701
EM2PIXELS (defaults_get_bubble_corner_radius (d), d),
1704
1666
cairo_fill (cr);
1709
// remove any current shape-mask
1710
gtk_widget_shape_combine_mask (priv->widget,NULL, 0, 0);
1712
// set new shape-mask
1713
gtk_widget_shape_combine_mask (priv->widget,mask, 0, 0);
1669
// remove any current shape-mask
1670
gtk_widget_shape_combine_mask (priv->widget,
1675
// set new shape-mask
1676
gtk_widget_shape_combine_mask (priv->widget,
1681
g_object_unref ((gpointer) mask);
1716
g_object_unref ((gpointer) mask);