diff --git a/ChangeLog b/ChangeLog index 1d6c992a91..cade49f500 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,38 @@ +Sun Jan 25 19:15:32 1998 Tim Janik + + * gtk/gtkwidget.h (enum): added new widget flag GTK_LEAVE_PENDING. + * gtk/gtkmain.c (gtk_main_iteration_do): if a widget has + GTK_LEAVE_PENDING set, send it its LEAVE_NOTIFY event, regardless + of a grab or sensitivity. + changed the compression code for enter/leave notify events to + free *both* compressed event, and removed an unneccessary call + to g_list_remove. + + * ChangeLog: finally catched up with the recent changes on my part. + + * gtk/gtkobject.h: new element n_args in GtkObjectClass. + * gtk/gtkobject.c (gtk_object_query_args): this function now returns + the arguments in the correct order. + + * gtk/gtkbox.c: + * gtk/gtkbutton.c: + * gtk/gtkcontainer.c: + * gtk/gtkframe.c: + * gtk/gtklabel.c: + * gtk/gtkobject.c: + * gtk/gtkwidget.c: + * gtk/gtkwindow.c: various fixes and additions to the gtk_*_set_arg + and gtk_*_get_arg() functions. + + * gdk/gdk.h: + * gdk/gdk.c (gdk_pointer_is_grabbed): new function. + + * gtk/gtkmain.h: + * gtk/gtkmain.c: implementations of gtk_invoke_key_snoopers(), + gtk_key_snooper_install() and gtk_key_snooper_remove(). this + mechanism allowes applications to track global hot keys that need + to bypass accelerator tables and else key processing stuff. + Thu Jan 22 18:58:44 1998 Federico Mena * gdk/gdkcc.c: Switched the file to GNU indentation, for consistency. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 1d6c992a91..cade49f500 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,38 @@ +Sun Jan 25 19:15:32 1998 Tim Janik + + * gtk/gtkwidget.h (enum): added new widget flag GTK_LEAVE_PENDING. + * gtk/gtkmain.c (gtk_main_iteration_do): if a widget has + GTK_LEAVE_PENDING set, send it its LEAVE_NOTIFY event, regardless + of a grab or sensitivity. + changed the compression code for enter/leave notify events to + free *both* compressed event, and removed an unneccessary call + to g_list_remove. + + * ChangeLog: finally catched up with the recent changes on my part. + + * gtk/gtkobject.h: new element n_args in GtkObjectClass. + * gtk/gtkobject.c (gtk_object_query_args): this function now returns + the arguments in the correct order. + + * gtk/gtkbox.c: + * gtk/gtkbutton.c: + * gtk/gtkcontainer.c: + * gtk/gtkframe.c: + * gtk/gtklabel.c: + * gtk/gtkobject.c: + * gtk/gtkwidget.c: + * gtk/gtkwindow.c: various fixes and additions to the gtk_*_set_arg + and gtk_*_get_arg() functions. + + * gdk/gdk.h: + * gdk/gdk.c (gdk_pointer_is_grabbed): new function. + + * gtk/gtkmain.h: + * gtk/gtkmain.c: implementations of gtk_invoke_key_snoopers(), + gtk_key_snooper_install() and gtk_key_snooper_remove(). this + mechanism allowes applications to track global hot keys that need + to bypass accelerator tables and else key processing stuff. + Thu Jan 22 18:58:44 1998 Federico Mena * gdk/gdkcc.c: Switched the file to GNU indentation, for consistency. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1d6c992a91..cade49f500 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,38 @@ +Sun Jan 25 19:15:32 1998 Tim Janik + + * gtk/gtkwidget.h (enum): added new widget flag GTK_LEAVE_PENDING. + * gtk/gtkmain.c (gtk_main_iteration_do): if a widget has + GTK_LEAVE_PENDING set, send it its LEAVE_NOTIFY event, regardless + of a grab or sensitivity. + changed the compression code for enter/leave notify events to + free *both* compressed event, and removed an unneccessary call + to g_list_remove. + + * ChangeLog: finally catched up with the recent changes on my part. + + * gtk/gtkobject.h: new element n_args in GtkObjectClass. + * gtk/gtkobject.c (gtk_object_query_args): this function now returns + the arguments in the correct order. + + * gtk/gtkbox.c: + * gtk/gtkbutton.c: + * gtk/gtkcontainer.c: + * gtk/gtkframe.c: + * gtk/gtklabel.c: + * gtk/gtkobject.c: + * gtk/gtkwidget.c: + * gtk/gtkwindow.c: various fixes and additions to the gtk_*_set_arg + and gtk_*_get_arg() functions. + + * gdk/gdk.h: + * gdk/gdk.c (gdk_pointer_is_grabbed): new function. + + * gtk/gtkmain.h: + * gtk/gtkmain.c: implementations of gtk_invoke_key_snoopers(), + gtk_key_snooper_install() and gtk_key_snooper_remove(). this + mechanism allowes applications to track global hot keys that need + to bypass accelerator tables and else key processing stuff. + Thu Jan 22 18:58:44 1998 Federico Mena * gdk/gdkcc.c: Switched the file to GNU indentation, for consistency. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 1d6c992a91..cade49f500 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,38 @@ +Sun Jan 25 19:15:32 1998 Tim Janik + + * gtk/gtkwidget.h (enum): added new widget flag GTK_LEAVE_PENDING. + * gtk/gtkmain.c (gtk_main_iteration_do): if a widget has + GTK_LEAVE_PENDING set, send it its LEAVE_NOTIFY event, regardless + of a grab or sensitivity. + changed the compression code for enter/leave notify events to + free *both* compressed event, and removed an unneccessary call + to g_list_remove. + + * ChangeLog: finally catched up with the recent changes on my part. + + * gtk/gtkobject.h: new element n_args in GtkObjectClass. + * gtk/gtkobject.c (gtk_object_query_args): this function now returns + the arguments in the correct order. + + * gtk/gtkbox.c: + * gtk/gtkbutton.c: + * gtk/gtkcontainer.c: + * gtk/gtkframe.c: + * gtk/gtklabel.c: + * gtk/gtkobject.c: + * gtk/gtkwidget.c: + * gtk/gtkwindow.c: various fixes and additions to the gtk_*_set_arg + and gtk_*_get_arg() functions. + + * gdk/gdk.h: + * gdk/gdk.c (gdk_pointer_is_grabbed): new function. + + * gtk/gtkmain.h: + * gtk/gtkmain.c: implementations of gtk_invoke_key_snoopers(), + gtk_key_snooper_install() and gtk_key_snooper_remove(). this + mechanism allowes applications to track global hot keys that need + to bypass accelerator tables and else key processing stuff. + Thu Jan 22 18:58:44 1998 Federico Mena * gdk/gdkcc.c: Switched the file to GNU indentation, for consistency. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 1d6c992a91..cade49f500 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,38 @@ +Sun Jan 25 19:15:32 1998 Tim Janik + + * gtk/gtkwidget.h (enum): added new widget flag GTK_LEAVE_PENDING. + * gtk/gtkmain.c (gtk_main_iteration_do): if a widget has + GTK_LEAVE_PENDING set, send it its LEAVE_NOTIFY event, regardless + of a grab or sensitivity. + changed the compression code for enter/leave notify events to + free *both* compressed event, and removed an unneccessary call + to g_list_remove. + + * ChangeLog: finally catched up with the recent changes on my part. + + * gtk/gtkobject.h: new element n_args in GtkObjectClass. + * gtk/gtkobject.c (gtk_object_query_args): this function now returns + the arguments in the correct order. + + * gtk/gtkbox.c: + * gtk/gtkbutton.c: + * gtk/gtkcontainer.c: + * gtk/gtkframe.c: + * gtk/gtklabel.c: + * gtk/gtkobject.c: + * gtk/gtkwidget.c: + * gtk/gtkwindow.c: various fixes and additions to the gtk_*_set_arg + and gtk_*_get_arg() functions. + + * gdk/gdk.h: + * gdk/gdk.c (gdk_pointer_is_grabbed): new function. + + * gtk/gtkmain.h: + * gtk/gtkmain.c: implementations of gtk_invoke_key_snoopers(), + gtk_key_snooper_install() and gtk_key_snooper_remove(). this + mechanism allowes applications to track global hot keys that need + to bypass accelerator tables and else key processing stuff. + Thu Jan 22 18:58:44 1998 Federico Mena * gdk/gdkcc.c: Switched the file to GNU indentation, for consistency. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 1d6c992a91..cade49f500 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,38 @@ +Sun Jan 25 19:15:32 1998 Tim Janik + + * gtk/gtkwidget.h (enum): added new widget flag GTK_LEAVE_PENDING. + * gtk/gtkmain.c (gtk_main_iteration_do): if a widget has + GTK_LEAVE_PENDING set, send it its LEAVE_NOTIFY event, regardless + of a grab or sensitivity. + changed the compression code for enter/leave notify events to + free *both* compressed event, and removed an unneccessary call + to g_list_remove. + + * ChangeLog: finally catched up with the recent changes on my part. + + * gtk/gtkobject.h: new element n_args in GtkObjectClass. + * gtk/gtkobject.c (gtk_object_query_args): this function now returns + the arguments in the correct order. + + * gtk/gtkbox.c: + * gtk/gtkbutton.c: + * gtk/gtkcontainer.c: + * gtk/gtkframe.c: + * gtk/gtklabel.c: + * gtk/gtkobject.c: + * gtk/gtkwidget.c: + * gtk/gtkwindow.c: various fixes and additions to the gtk_*_set_arg + and gtk_*_get_arg() functions. + + * gdk/gdk.h: + * gdk/gdk.c (gdk_pointer_is_grabbed): new function. + + * gtk/gtkmain.h: + * gtk/gtkmain.c: implementations of gtk_invoke_key_snoopers(), + gtk_key_snooper_install() and gtk_key_snooper_remove(). this + mechanism allowes applications to track global hot keys that need + to bypass accelerator tables and else key processing stuff. + Thu Jan 22 18:58:44 1998 Federico Mena * gdk/gdkcc.c: Switched the file to GNU indentation, for consistency. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 1d6c992a91..cade49f500 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,38 @@ +Sun Jan 25 19:15:32 1998 Tim Janik + + * gtk/gtkwidget.h (enum): added new widget flag GTK_LEAVE_PENDING. + * gtk/gtkmain.c (gtk_main_iteration_do): if a widget has + GTK_LEAVE_PENDING set, send it its LEAVE_NOTIFY event, regardless + of a grab or sensitivity. + changed the compression code for enter/leave notify events to + free *both* compressed event, and removed an unneccessary call + to g_list_remove. + + * ChangeLog: finally catched up with the recent changes on my part. + + * gtk/gtkobject.h: new element n_args in GtkObjectClass. + * gtk/gtkobject.c (gtk_object_query_args): this function now returns + the arguments in the correct order. + + * gtk/gtkbox.c: + * gtk/gtkbutton.c: + * gtk/gtkcontainer.c: + * gtk/gtkframe.c: + * gtk/gtklabel.c: + * gtk/gtkobject.c: + * gtk/gtkwidget.c: + * gtk/gtkwindow.c: various fixes and additions to the gtk_*_set_arg + and gtk_*_get_arg() functions. + + * gdk/gdk.h: + * gdk/gdk.c (gdk_pointer_is_grabbed): new function. + + * gtk/gtkmain.h: + * gtk/gtkmain.c: implementations of gtk_invoke_key_snoopers(), + gtk_key_snooper_install() and gtk_key_snooper_remove(). this + mechanism allowes applications to track global hot keys that need + to bypass accelerator tables and else key processing stuff. + Thu Jan 22 18:58:44 1998 Federico Mena * gdk/gdkcc.c: Switched the file to GNU indentation, for consistency. diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 19ae056cbf..1a4182816a 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -103,7 +103,6 @@ static gint done; static guint main_level = 0; static gint initialized = FALSE; static GdkEvent *next_event = NULL; -static GdkEvent *current_event = NULL; static GList *current_events = NULL; static GSList *grabs = NULL; /* A stack of unique grabs. The grabbing @@ -321,11 +320,9 @@ gtk_main_iteration_do (gboolean blocking) (next_event->type != event->type) && (next_event->any.window == event->any.window)) { - tmp_list = current_events; - current_events = g_list_remove_link (current_events, tmp_list); - g_list_free_1 (tmp_list); - gdk_event_free (event); + gdk_event_free (next_event); + next_event = NULL; return done; } @@ -373,15 +370,19 @@ gtk_main_iteration_do (gboolean blocking) case GDK_DELETE: gtk_object_ref (GTK_OBJECT (event_widget)); if (gtk_widget_event (event_widget, event)) - gtk_widget_destroy (event_widget); - gtk_object_unref (GTK_OBJECT (event_widget)); + { + gtk_object_unref (GTK_OBJECT (event_widget)); + gtk_widget_destroy (event_widget); + } + else + gtk_object_unref (GTK_OBJECT (event_widget)); break; case GDK_DESTROY: gtk_object_ref (GTK_OBJECT (event_widget)); gtk_widget_event (event_widget, event); - gtk_widget_destroy (event_widget); gtk_object_unref (GTK_OBJECT (event_widget)); + gtk_widget_destroy (event_widget); break; case GDK_PROPERTY_NOTIFY: @@ -399,7 +400,6 @@ gtk_main_iteration_do (gboolean blocking) break; } /* otherwise fall through */ - case GDK_EXPOSE: case GDK_NO_EXPOSE: case GDK_FOCUS_CHANGE: @@ -439,8 +439,21 @@ gtk_main_iteration_do (gboolean blocking) break; case GDK_ENTER_NOTIFY: - case GDK_LEAVE_NOTIFY: if (grab_widget && GTK_WIDGET_IS_SENSITIVE (grab_widget)) + { + gtk_widget_event (grab_widget, event); + if (event_widget == grab_widget) + GTK_WIDGET_SET_FLAGS (event_widget, GTK_LEAVE_PENDING); + } + break; + + case GDK_LEAVE_NOTIFY: + if (event_widget && GTK_WIDGET_LEAVE_PENDING (event_widget)) + { + GTK_WIDGET_UNSET_FLAGS (event_widget, GTK_LEAVE_PENDING); + gtk_widget_event (event_widget, event); + } + else if (grab_widget && GTK_WIDGET_IS_SENSITIVE (grab_widget)) gtk_widget_event (grab_widget, event); break; } @@ -450,8 +463,6 @@ gtk_main_iteration_do (gboolean blocking) g_list_free_1 (tmp_list); gdk_event_free (event); - - current_event = NULL; } else { diff --git a/gtk/gtksignal.c b/gtk/gtksignal.c index 3c991d43da..00a54fb166 100644 --- a/gtk/gtksignal.c +++ b/gtk/gtksignal.c @@ -427,6 +427,7 @@ gtk_signal_connect_object (GtkObject *object, gint type; g_return_val_if_fail (object != NULL, 0); + /* slot_object needs to be treated as ordinary pointer */ if (initialize) gtk_signal_init (); diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index 5d6e5b7286..2428a0c662 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -54,7 +54,8 @@ enum GTK_REDRAW_PENDING = 1 << 19, GTK_RESIZE_PENDING = 1 << 20, GTK_RESIZE_NEEDED = 1 << 21, - GTK_HAS_SHAPE_MASK = 1 << 22 + GTK_HAS_SHAPE_MASK = 1 << 22, + GTK_LEAVE_PENDING = 1 << 23 }; @@ -96,6 +97,7 @@ enum #define GTK_WIDGET_RESIZE_PENDING(obj) (GTK_OBJECT_FLAGS (obj) & GTK_RESIZE_PENDING) #define GTK_WIDGET_RESIZE_NEEDED(obj) (GTK_OBJECT_FLAGS (obj) & GTK_RESIZE_NEEDED) #define GTK_WIDGET_HAS_SHAPE_MASK(obj) (GTK_OBJECT_FLAGS (obj) & GTK_HAS_SHAPE_MASK) +#define GTK_WIDGET_LEAVE_PENDING(obj) (GTK_OBJECT_FLAGS (obj) & GTK_LEAVE_PENDING) #define GTK_TYPE_WIDGET (gtk_widget_get_type ())