added new widget flag GTK_LEAVE_PENDING. if a widget has GTK_LEAVE_PENDING

Sun Jan 25 19:15:32 1998  Tim Janik  <timj@gimp.org>

        * 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.
This commit is contained in:
Tim Janik 1998-01-25 18:45:56 +00:00 committed by Tim Janik
parent 33f3f4a2ae
commit edf9e176db
10 changed files with 272 additions and 13 deletions

View File

@ -1,3 +1,38 @@
Sun Jan 25 19:15:32 1998 Tim Janik <timj@gimp.org>
* 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 <federico@bananoid.nuclecu.unam.mx>
* gdk/gdkcc.c: Switched the file to GNU indentation, for consistency.

View File

@ -1,3 +1,38 @@
Sun Jan 25 19:15:32 1998 Tim Janik <timj@gimp.org>
* 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 <federico@bananoid.nuclecu.unam.mx>
* gdk/gdkcc.c: Switched the file to GNU indentation, for consistency.

View File

@ -1,3 +1,38 @@
Sun Jan 25 19:15:32 1998 Tim Janik <timj@gimp.org>
* 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 <federico@bananoid.nuclecu.unam.mx>
* gdk/gdkcc.c: Switched the file to GNU indentation, for consistency.

View File

@ -1,3 +1,38 @@
Sun Jan 25 19:15:32 1998 Tim Janik <timj@gimp.org>
* 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 <federico@bananoid.nuclecu.unam.mx>
* gdk/gdkcc.c: Switched the file to GNU indentation, for consistency.

View File

@ -1,3 +1,38 @@
Sun Jan 25 19:15:32 1998 Tim Janik <timj@gimp.org>
* 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 <federico@bananoid.nuclecu.unam.mx>
* gdk/gdkcc.c: Switched the file to GNU indentation, for consistency.

View File

@ -1,3 +1,38 @@
Sun Jan 25 19:15:32 1998 Tim Janik <timj@gimp.org>
* 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 <federico@bananoid.nuclecu.unam.mx>
* gdk/gdkcc.c: Switched the file to GNU indentation, for consistency.

View File

@ -1,3 +1,38 @@
Sun Jan 25 19:15:32 1998 Tim Janik <timj@gimp.org>
* 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 <federico@bananoid.nuclecu.unam.mx>
* gdk/gdkcc.c: Switched the file to GNU indentation, for consistency.

View File

@ -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
{

View File

@ -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 ();

View File

@ -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 ())