[gtk/wip/carlosg/input-cleanups: 25/26] gtkwidget: Drop _gtk_widget_[gs]et_shadowed()



commit 8e549d73a0bd28dc1abe0dd888b667c2a5e1ba0a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jun 24 17:31:03 2020 +0200

    gtkwidget: Drop _gtk_widget_[gs]et_shadowed()
    
    This API is meaningless now, with grab-notify being handled internally.

 gtk/gtktreeview.c      |  3 +--
 gtk/gtkwidget.c        | 17 -----------------
 gtk/gtkwidgetprivate.h |  4 ----
 gtk/gtkwindow.c        |  2 --
 4 files changed, 1 insertion(+), 25 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index d93cd0a4c3..d7b121dd92 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2691,8 +2691,7 @@ grab_focus_and_unset_draw_keyfocus (GtkTreeView *tree_view)
   GtkWidget *widget = GTK_WIDGET (tree_view);
 
   if (gtk_widget_get_focusable (widget) &&
-      !gtk_widget_has_focus (widget) &&
-      !_gtk_widget_get_shadowed (widget))
+      !gtk_widget_has_focus (widget))
     gtk_widget_grab_focus (widget);
 
   tree_view->draw_keyfocus = 0;
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index edfed3a452..897ce13965 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10215,23 +10215,6 @@ gtk_widget_in_destruction (GtkWidget *widget)
   return priv->in_destruction;
 }
 
-gboolean
-_gtk_widget_get_shadowed (GtkWidget *widget)
-{
-  GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
-
-  return priv->shadowed;
-}
-
-void
-_gtk_widget_set_shadowed (GtkWidget *widget,
-                          gboolean   shadowed)
-{
-  GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
-
-  priv->shadowed = shadowed;
-}
-
 gboolean
 _gtk_widget_get_alloc_needed (GtkWidget *widget)
 {
diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h
index 7ff554236b..1fa09c48fb 100644
--- a/gtk/gtkwidgetprivate.h
+++ b/gtk/gtkwidgetprivate.h
@@ -82,7 +82,6 @@ struct _GtkWidgetPrivate
   guint has_default           : 1;
   guint receives_default      : 1;
   guint has_grab              : 1;
-  guint shadowed              : 1;
   guint child_visible         : 1;
   guint can_target            : 1;
 
@@ -221,9 +220,6 @@ void          gtk_widget_unroot             (GtkWidget *widget);
 GtkCssNode *  gtk_widget_get_css_node       (GtkWidget *widget);
 void         _gtk_widget_set_visible_flag   (GtkWidget *widget,
                                              gboolean   visible);
-gboolean     _gtk_widget_get_shadowed       (GtkWidget *widget);
-void         _gtk_widget_set_shadowed       (GtkWidget *widget,
-                                             gboolean   shadowed);
 gboolean     _gtk_widget_get_alloc_needed   (GtkWidget *widget);
 gboolean     gtk_widget_needs_allocate      (GtkWidget *widget);
 void         gtk_widget_ensure_resize       (GtkWidget *widget);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index aeeb383088..86b745e3a4 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7235,7 +7235,6 @@ gtk_grab_notify_foreach (GtkWidget *child,
 
   if (is_shadowed)
     {
-      _gtk_widget_set_shadowed (child, TRUE);
       if (!was_shadowed &&
           gtk_widget_is_sensitive (child))
         _gtk_widget_synthesize_crossing (child,
@@ -7245,7 +7244,6 @@ gtk_grab_notify_foreach (GtkWidget *child,
     }
   else
     {
-      _gtk_widget_set_shadowed (child, FALSE);
       if (was_shadowed &&
           gtk_widget_is_sensitive (child))
         _gtk_widget_synthesize_crossing (old_grab_widget, child,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]