[gtk/kill-hierarchy-changed: 13/14] Drop the anchored field
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/kill-hierarchy-changed: 13/14] Drop the anchored field
- Date: Sat, 23 Feb 2019 14:45:51 +0000 (UTC)
commit a3901f2563378f2eaebf51694575cb9d550dedba
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Feb 23 01:38:14 2019 -0500
Drop the anchored field
We can just change priv->root instead.
gtk/gtkwidget.c | 22 ++--------------------
gtk/gtkwidgetprivate.h | 4 ----
gtk/gtkwindow.c | 1 -
3 files changed, 2 insertions(+), 25 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index e756b6eb2e..a3a46f739f 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3755,7 +3755,6 @@ gtk_widget_realize (GtkWidget *widget)
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (priv->anchored || GTK_IS_INVISIBLE (widget));
if (!_gtk_widget_get_realized (widget))
{
@@ -5493,7 +5492,7 @@ gtk_widget_real_style_updated (GtkWidget *widget)
if (has_text && gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT))
gtk_widget_update_pango_context (widget);
- if (priv->anchored)
+ if (priv->root)
{
if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_SIZE) ||
(has_text && gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT_SIZE)))
@@ -5515,7 +5514,7 @@ gtk_widget_real_style_updated (GtkWidget *widget)
{
gtk_widget_update_pango_context (widget);
- if (priv->anchored)
+ if (priv->root)
gtk_widget_queue_resize (widget);
}
}
@@ -11763,23 +11762,6 @@ gtk_widget_in_destruction (GtkWidget *widget)
return priv->in_destruction;
}
-gboolean
-_gtk_widget_get_anchored (GtkWidget *widget)
-{
- GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
-
- return priv->anchored;
-}
-
-void
-_gtk_widget_set_anchored (GtkWidget *widget,
- gboolean anchored)
-{
- GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
-
- priv->anchored = anchored;
-}
-
gboolean
_gtk_widget_get_shadowed (GtkWidget *widget)
{
diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h
index 16fe80878d..d0f3016364 100644
--- a/gtk/gtkwidgetprivate.h
+++ b/gtk/gtkwidgetprivate.h
@@ -58,7 +58,6 @@ struct _GtkWidgetPrivate
#endif
guint in_destruction : 1;
- guint anchored : 1;
guint no_surface : 1;
guint no_surface_set : 1;
guint realized : 1;
@@ -195,9 +194,6 @@ struct _GtkWidgetPrivate
GtkCssNode * gtk_widget_get_css_node (GtkWidget *widget);
void _gtk_widget_set_visible_flag (GtkWidget *widget,
gboolean visible);
-gboolean _gtk_widget_get_anchored (GtkWidget *widget);
-void _gtk_widget_set_anchored (GtkWidget *widget,
- gboolean anchored);
gboolean _gtk_widget_get_shadowed (GtkWidget *widget);
void _gtk_widget_set_shadowed (GtkWidget *widget,
gboolean shadowed);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 8682969454..719967cd64 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1866,7 +1866,6 @@ gtk_window_init (GtkWindow *window)
widget = GTK_WIDGET (window);
gtk_widget_set_has_surface (widget, TRUE);
- _gtk_widget_set_anchored (widget, TRUE);
priv->title = NULL;
priv->wm_role = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]