[gtk+/wip/baedert/drawing: 333/355] widget: Simplify snapshot_child
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 333/355] widget: Simplify snapshot_child
- Date: Tue, 11 Jul 2017 16:56:19 +0000 (UTC)
commit 241ae8dbc8919cf6c7ab6245cbb83a83bde9077b
Author: Timm Bäder <mail baedert org>
Date: Tue Jul 4 15:41:27 2017 +0200
widget: Simplify snapshot_child
gtk/gtkwidget.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index dda4856..4cb273a 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15666,15 +15666,14 @@ gtk_widget_snapshot_child (GtkWidget *widget,
GtkWidget *child,
GtkSnapshot *snapshot)
{
- GtkAllocation content_allocation;
+ GtkWidgetPrivate *priv = gtk_widget_get_instance_private (child);
int x, y;
g_return_if_fail (_gtk_widget_get_parent (child) == widget);
g_return_if_fail (snapshot != NULL);
- _gtk_widget_get_allocation (child, &content_allocation);
- x = content_allocation.x;
- y = content_allocation.y;
+ x = priv->allocation.x;
+ y = priv->allocation.y;
gtk_snapshot_offset (snapshot, x, y);
gtk_widget_snapshot (child, snapshot);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]