[gtk/abolish-size-allocate: 10/10] a11y: Stop using ::size-allocate



commit 0684bb61a3507820419a3e0d7b11802d7f438ea8
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue May 5 12:11:29 2020 -0400

    a11y: Stop using ::size-allocate
    
    This means that we currently have no way to monitor
    for bounds changes. This will come back later.

 gtk/a11y/gtkwidgetaccessible.c | 25 -------------------------
 1 file changed, 25 deletions(-)
---
diff --git a/gtk/a11y/gtkwidgetaccessible.c b/gtk/a11y/gtkwidgetaccessible.c
index 84732dcda5..9c4f0f5cc7 100644
--- a/gtk/a11y/gtkwidgetaccessible.c
+++ b/gtk/a11y/gtkwidgetaccessible.c
@@ -54,30 +54,6 @@ notify_cb (GObject    *obj,
     klass->notify_gtk (obj, pspec);
 }
 
-/* Translate GtkWidget::size-allocate to AtkComponent::bounds-changed */
-static void
-size_allocate_cb (GtkWidget *widget,
-                  int        width,
-                  int        height)
-{
-  AtkObject* accessible;
-  AtkRectangle rect;
-
-  accessible = gtk_widget_get_accessible (widget);
-  if (ATK_IS_COMPONENT (accessible))
-    {
-      GtkAllocation alloc;
-      gtk_widget_get_allocation (widget, &alloc);
-
-      rect.x = alloc.x;
-      rect.y = alloc.y;
-      rect.width = alloc.width;
-      rect.height = alloc.height;
-
-      g_signal_emit_by_name (accessible, "bounds-changed", &rect);
-    }
-}
-
 /* Translate GtkWidget mapped state into AtkObject showing */
 static gint
 map_cb (GtkWidget *widget)
@@ -109,7 +85,6 @@ gtk_widget_accessible_initialize (AtkObject *obj,
   widget = GTK_WIDGET (data);
 
   g_signal_connect (widget, "notify", G_CALLBACK (notify_cb), NULL);
-  g_signal_connect (widget, "size-allocate", G_CALLBACK (size_allocate_cb), NULL);
   g_signal_connect (widget, "map", G_CALLBACK (map_cb), NULL);
   g_signal_connect (widget, "unmap", G_CALLBACK (map_cb), NULL);
 


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