[gtk+/wip/matthiasc/kill-event-signals] Drop ::grab-broken-event



commit cc5a8b054f974077b610f646d1653ee83a21baaf
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 2 17:05:08 2018 -0500

    Drop ::grab-broken-event
    
    This signal is no longer used in GTK+. Grab broken events
    can be handled with the generic ::event signal.

 gtk/gtkwidget.c |   44 +-------------------------------------------
 gtk/gtkwidget.h |    4 ----
 2 files changed, 1 insertions(+), 47 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index d6913c7..73b3dff 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -511,7 +511,6 @@ enum {
   KEY_RELEASE_EVENT,
   FOCUS_IN_EVENT,
   FOCUS_OUT_EVENT,
-  GRAB_BROKEN_EVENT,
   DRAG_BEGIN,
   DRAG_END,
   DRAG_DATA_DELETE,
@@ -637,8 +636,6 @@ static gboolean             gtk_widget_real_focus_in_event           (GtkWidget       
*widget,
                                                                  GdkEventFocus   *event);
 static gboolean                gtk_widget_real_focus_out_event         (GtkWidget        *widget,
                                                                 GdkEventFocus    *event);
-static gboolean         gtk_widget_real_grab_broken_event       (GtkWidget          *widget,
-                                                                 GdkEventGrabBroken *event);
 static gboolean                gtk_widget_real_focus                   (GtkWidget        *widget,
                                                                 GtkDirectionType  direction);
 static void             gtk_widget_real_move_focus              (GtkWidget        *widget,
@@ -1026,7 +1023,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
   klass->drag_data_received = NULL;
   klass->display_changed = NULL;
   klass->can_activate_accel = gtk_widget_real_can_activate_accel;
-  klass->grab_broken_event = gtk_widget_real_grab_broken_event;
   klass->query_tooltip = gtk_widget_real_query_tooltip;
   klass->style_updated = gtk_widget_real_style_updated;
 
@@ -2501,35 +2497,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                  GTK_TYPE_SELECTION_DATA | G_SIGNAL_TYPE_STATIC_SCOPE,
                  G_TYPE_UINT);
 
-/**
-   * GtkWidget::grab-broken-event:
-   * @widget: the object which received the signal
-   * @event: (type Gdk.EventGrabBroken): the #GdkEventGrabBroken event
-   *
-   * Emitted when a pointer or keyboard grab on a window belonging
-   * to @widget gets broken.
-   *
-   * On X11, this happens when the grab window becomes unviewable
-   * (i.e. it or one of its ancestors is unmapped), or if the same
-   * application grabs the pointer or keyboard again.
-   *
-   * Returns: %TRUE to stop other handlers from being invoked for
-   *   the event. %FALSE to propagate the event further.
-   *
-   * Since: 2.8
-   */
-  widget_signals[GRAB_BROKEN_EVENT] =
-    g_signal_new (I_("grab-broken-event"),
-                 G_TYPE_FROM_CLASS (klass),
-                 G_SIGNAL_RUN_LAST,
-                 G_STRUCT_OFFSET (GtkWidgetClass, grab_broken_event),
-                 _gtk_boolean_handled_accumulator, NULL,
-                 _gtk_marshal_BOOLEAN__OBJECT,
-                 G_TYPE_BOOLEAN, 1,
-                 GDK_TYPE_EVENT);
-  g_signal_set_va_marshaller (widget_signals[GRAB_BROKEN_EVENT], G_TYPE_FROM_CLASS (klass),
-                              _gtk_marshal_BOOLEAN__OBJECTv);
-
   /**
    * GtkWidget::query-tooltip:
    * @widget: the object which received the signal
@@ -5937,13 +5904,6 @@ gtk_widget_real_focus_out_event (GtkWidget     *widget,
   return FALSE;
 }
 
-static gboolean
-gtk_widget_real_grab_broken_event (GtkWidget          *widget,
-                                   GdkEventGrabBroken *event)
-{
-  return GDK_EVENT_PROPAGATE;
-}
-
 #define WIDGET_REALIZED_FOR_EVENT(widget, event) \
      (event->any.type == GDK_FOCUS_CHANGE || _gtk_widget_get_realized(widget))
 
@@ -6259,6 +6219,7 @@ gtk_widget_emit_event_signals (GtkWidget      *widget,
        case GDK_CONFIGURE:
        case GDK_ENTER_NOTIFY:
        case GDK_LEAVE_NOTIFY:
+       case GDK_GRAB_BROKEN:
        case GDK_NOTHING:
          signal_num = -1;
          break;
@@ -6280,9 +6241,6 @@ gtk_widget_emit_event_signals (GtkWidget      *widget,
        case GDK_FOCUS_CHANGE:
          signal_num = event->focus_change.in ? FOCUS_IN_EVENT : FOCUS_OUT_EVENT;
          break;
-       case GDK_GRAB_BROKEN:
-         signal_num = GRAB_BROKEN_EVENT;
-         break;
        default:
          g_warning ("gtk_widget_event(): unhandled event type: %d", event->any.type);
          signal_num = -1;
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index aaabb7b..d995077 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -208,8 +208,6 @@ struct _GtkWidget
  * widget’s window.
  * @focus_out_event: Signal emitted when the keyboard focus leaves the
  * widget’s window.
- * @grab_broken_event: Signal emitted when a pointer or keyboard grab
- *   on a window belonging to widget gets broken.
  * @drag_begin: Signal emitted on the drag source when a drag is
  *   started.
  * @drag_end: Signal emitted on the drag source when a drag is
@@ -328,8 +326,6 @@ struct _GtkWidgetClass
                                         GdkEventFocus       *event);
   gboolean (* focus_out_event)         (GtkWidget           *widget,
                                         GdkEventFocus       *event);
-  gboolean (* grab_broken_event)        (GtkWidget           *widget,
-                                         GdkEventGrabBroken  *event);
 
   /* Source side drag signals */
   void     (* drag_begin)          (GtkWidget         *widget,


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