mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 00:30:08 +00:00
GDK_VISIBILITY_NOTIFY events were not working at all. It was my
fault; I wrote them hurriedly before going on vacation, and I never did any testing. Sorry :-) Apart from the fix in Gdk, I added the corresponding "visibility_notify_event" to GtkWidget. - Federico
This commit is contained in:
parent
49517ca835
commit
1f07d39e23
@ -373,9 +373,9 @@ typedef enum
|
||||
GDK_FOCUS_CHANGE_MASK = 1 << 14,
|
||||
GDK_STRUCTURE_MASK = 1 << 15,
|
||||
GDK_PROPERTY_CHANGE_MASK = 1 << 16,
|
||||
GDK_PROXIMITY_IN_MASK = 1 << 17,
|
||||
GDK_PROXIMITY_OUT_MASK = 1 << 18,
|
||||
GDK_VISIBILITY_NOTIFY_MASK = 1 << 19,
|
||||
GDK_VISIBILITY_NOTIFY_MASK = 1 << 17,
|
||||
GDK_PROXIMITY_IN_MASK = 1 << 18,
|
||||
GDK_PROXIMITY_OUT_MASK = 1 << 19,
|
||||
GDK_ALL_EVENTS_MASK = 0x07FFFF
|
||||
} GdkEventMask;
|
||||
|
||||
|
@ -46,9 +46,9 @@ int event_mask_table[19] =
|
||||
FocusChangeMask,
|
||||
StructureNotifyMask,
|
||||
PropertyChangeMask,
|
||||
VisibilityChangeMask,
|
||||
0, /* PROXIMITY_IN */
|
||||
0, /* PROXIMTY_OUT */
|
||||
VisibilityChangeMask
|
||||
0 /* PROXIMTY_OUT */
|
||||
};
|
||||
|
||||
|
||||
|
@ -46,9 +46,9 @@ int event_mask_table[19] =
|
||||
FocusChangeMask,
|
||||
StructureNotifyMask,
|
||||
PropertyChangeMask,
|
||||
VisibilityChangeMask,
|
||||
0, /* PROXIMITY_IN */
|
||||
0, /* PROXIMTY_OUT */
|
||||
VisibilityChangeMask
|
||||
0 /* PROXIMTY_OUT */
|
||||
};
|
||||
|
||||
|
||||
|
@ -76,6 +76,7 @@ enum {
|
||||
DROP_DATA_AVAILABLE_EVENT,
|
||||
OTHER_EVENT,
|
||||
CLIENT_EVENT,
|
||||
VISIBILITY_NOTIFY_EVENT,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
@ -588,6 +589,14 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
gtk_widget_marshal_signal_4,
|
||||
GTK_TYPE_BOOL, 1,
|
||||
GTK_TYPE_GDK_EVENT);
|
||||
widget_signals[VISIBILITY_NOTIFY_EVENT] =
|
||||
gtk_signal_new ("visibility_notify_event",
|
||||
GTK_RUN_LAST,
|
||||
object_class->type,
|
||||
GTK_SIGNAL_OFFSET (GtkWidgetClass, visibility_notify_event),
|
||||
gtk_widget_marshal_signal_4,
|
||||
GTK_TYPE_BOOL, 1,
|
||||
GTK_TYPE_GDK_EVENT);
|
||||
|
||||
gtk_object_class_add_signals (object_class, widget_signals, LAST_SIGNAL);
|
||||
|
||||
@ -638,6 +647,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
klass->drop_leave_event = NULL;
|
||||
klass->drop_data_available_event = NULL;
|
||||
klass->other_event = NULL;
|
||||
klass->visibility_notify_event = NULL;
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
@ -1572,6 +1582,9 @@ gtk_widget_event (GtkWidget *widget,
|
||||
case GDK_OTHER_EVENT:
|
||||
signal_num = OTHER_EVENT;
|
||||
break;
|
||||
case GDK_VISIBILITY_NOTIFY:
|
||||
signal_num = VISIBILITY_NOTIFY_EVENT;
|
||||
break;
|
||||
case GDK_CLIENT_EVENT:
|
||||
signal_num = CLIENT_EVENT;
|
||||
break;
|
||||
|
108
gtk/gtkwidget.h
108
gtk/gtkwidget.h
@ -268,62 +268,64 @@ struct _GtkWidgetClass
|
||||
const gchar *signal_name);
|
||||
|
||||
/* events */
|
||||
gint (* event) (GtkWidget *widget,
|
||||
GdkEvent *event);
|
||||
gint (* button_press_event) (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
gint (* button_release_event) (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
gint (* motion_notify_event) (GtkWidget *widget,
|
||||
GdkEventMotion *event);
|
||||
gint (* delete_event) (GtkWidget *widget,
|
||||
GdkEventAny *event);
|
||||
gint (* destroy_event) (GtkWidget *widget,
|
||||
GdkEventAny *event);
|
||||
gint (* expose_event) (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
gint (* key_press_event) (GtkWidget *widget,
|
||||
GdkEventKey *event);
|
||||
gint (* key_release_event) (GtkWidget *widget,
|
||||
GdkEventKey *event);
|
||||
gint (* enter_notify_event) (GtkWidget *widget,
|
||||
GdkEventCrossing *event);
|
||||
gint (* leave_notify_event) (GtkWidget *widget,
|
||||
GdkEventCrossing *event);
|
||||
gint (* configure_event) (GtkWidget *widget,
|
||||
GdkEventConfigure *event);
|
||||
gint (* focus_in_event) (GtkWidget *widget,
|
||||
GdkEventFocus *event);
|
||||
gint (* focus_out_event) (GtkWidget *widget,
|
||||
GdkEventFocus *event);
|
||||
gint (* map_event) (GtkWidget *widget,
|
||||
GdkEventAny *event);
|
||||
gint (* unmap_event) (GtkWidget *widget,
|
||||
GdkEventAny *event);
|
||||
gint (* property_notify_event) (GtkWidget *widget,
|
||||
GdkEventProperty *event);
|
||||
gint (* selection_clear_event) (GtkWidget *widget,
|
||||
GdkEventSelection *event);
|
||||
gint (* selection_request_event) (GtkWidget *widget,
|
||||
GdkEventSelection *event);
|
||||
gint (* selection_notify_event) (GtkWidget *widget,
|
||||
GdkEventSelection *event);
|
||||
gint (* proximity_in_event) (GtkWidget *widget,
|
||||
GdkEventProximity *event);
|
||||
gint (* proximity_out_event) (GtkWidget *widget,
|
||||
GdkEventProximity *event);
|
||||
gint (* drag_begin_event) (GtkWidget *widget,
|
||||
GdkEventDragBegin *event);
|
||||
gint (* drag_request_event) (GtkWidget *widget,
|
||||
gint (* event) (GtkWidget *widget,
|
||||
GdkEvent *event);
|
||||
gint (* button_press_event) (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
gint (* button_release_event) (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
gint (* motion_notify_event) (GtkWidget *widget,
|
||||
GdkEventMotion *event);
|
||||
gint (* delete_event) (GtkWidget *widget,
|
||||
GdkEventAny *event);
|
||||
gint (* destroy_event) (GtkWidget *widget,
|
||||
GdkEventAny *event);
|
||||
gint (* expose_event) (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
gint (* key_press_event) (GtkWidget *widget,
|
||||
GdkEventKey *event);
|
||||
gint (* key_release_event) (GtkWidget *widget,
|
||||
GdkEventKey *event);
|
||||
gint (* enter_notify_event) (GtkWidget *widget,
|
||||
GdkEventCrossing *event);
|
||||
gint (* leave_notify_event) (GtkWidget *widget,
|
||||
GdkEventCrossing *event);
|
||||
gint (* configure_event) (GtkWidget *widget,
|
||||
GdkEventConfigure *event);
|
||||
gint (* focus_in_event) (GtkWidget *widget,
|
||||
GdkEventFocus *event);
|
||||
gint (* focus_out_event) (GtkWidget *widget,
|
||||
GdkEventFocus *event);
|
||||
gint (* map_event) (GtkWidget *widget,
|
||||
GdkEventAny *event);
|
||||
gint (* unmap_event) (GtkWidget *widget,
|
||||
GdkEventAny *event);
|
||||
gint (* property_notify_event) (GtkWidget *widget,
|
||||
GdkEventProperty *event);
|
||||
gint (* selection_clear_event) (GtkWidget *widget,
|
||||
GdkEventSelection *event);
|
||||
gint (* selection_request_event) (GtkWidget *widget,
|
||||
GdkEventSelection *event);
|
||||
gint (* selection_notify_event) (GtkWidget *widget,
|
||||
GdkEventSelection *event);
|
||||
gint (* proximity_in_event) (GtkWidget *widget,
|
||||
GdkEventProximity *event);
|
||||
gint (* proximity_out_event) (GtkWidget *widget,
|
||||
GdkEventProximity *event);
|
||||
gint (* drag_begin_event) (GtkWidget *widget,
|
||||
GdkEventDragBegin *event);
|
||||
gint (* drag_request_event) (GtkWidget *widget,
|
||||
GdkEventDragRequest *event);
|
||||
gint (* drop_enter_event) (GtkWidget *widget,
|
||||
GdkEventDropEnter *event);
|
||||
gint (* drop_leave_event) (GtkWidget *widget,
|
||||
GdkEventDropLeave *event);
|
||||
gint (* drop_enter_event) (GtkWidget *widget,
|
||||
GdkEventDropEnter *event);
|
||||
gint (* drop_leave_event) (GtkWidget *widget,
|
||||
GdkEventDropLeave *event);
|
||||
gint (* drop_data_available_event) (GtkWidget *widget,
|
||||
GdkEventDropDataAvailable *event);
|
||||
gint (* other_event) (GtkWidget *widget,
|
||||
GdkEventOther *event);
|
||||
gint (* other_event) (GtkWidget *widget,
|
||||
GdkEventOther *event);
|
||||
gint (* visibility_notify_event) (GtkWidget *widget,
|
||||
GdkEventVisibility *event);
|
||||
|
||||
/* selection */
|
||||
void (* selection_received) (GtkWidget *widget,
|
||||
|
Loading…
Reference in New Issue
Block a user