[gtk+/wip/matthiasc/kill-event-signals: 96/126] Drop ::grab-broken-event
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/kill-event-signals: 96/126] Drop ::grab-broken-event
- Date: Mon, 15 Jan 2018 13:07:53 +0000 (UTC)
commit 18c61033a798081656789d33a20ccd62ac16efe6
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 9405c63..a92f258 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -497,7 +497,6 @@ enum {
KEY_RELEASE_EVENT,
FOCUS_IN_EVENT,
FOCUS_OUT_EVENT,
- GRAB_BROKEN_EVENT,
DRAG_BEGIN,
DRAG_END,
DRAG_DATA_DELETE,
@@ -623,8 +622,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,
@@ -1015,7 +1012,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;
@@ -2490,35 +2486,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
@@ -5927,13 +5894,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))
@@ -6249,6 +6209,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;
@@ -6270,9 +6231,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]