Merge branch 'wip/muktupavels/opaque-region' into 'gtk-3-24'

window: fix opaque region

See merge request GNOME/gtk!1221
This commit is contained in:
Matthias Clasen 2019-12-01 15:11:52 +00:00
commit 06d1cf5e52

View File

@ -7236,13 +7236,20 @@ corner_rect (cairo_rectangle_int_t *rect,
}
static void
subtract_corners_from_region (cairo_region_t *region,
cairo_rectangle_int_t *extents,
GtkStyleContext *context,
GtkWindow *window)
subtract_decoration_corners_from_region (cairo_region_t *region,
cairo_rectangle_int_t *extents,
GtkStyleContext *context,
GtkWindow *window)
{
GtkWindowPrivate *priv = window->priv;
cairo_rectangle_int_t rect;
if (!priv->client_decorated ||
!priv->decorated ||
priv->fullscreen ||
priv->maximized)
return;
gtk_style_context_save_to_node (context, window->priv->decoration_node);
corner_rect (&rect, _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_LEFT_RADIUS));
@ -7304,7 +7311,7 @@ update_opaque_region (GtkWindow *window,
opaque_region = cairo_region_create_rectangle (&rect);
subtract_corners_from_region (opaque_region, &rect, context, window);
subtract_decoration_corners_from_region (opaque_region, &rect, context, window);
}
else
{