Commit ab798921 authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

take expired timeouts into account, otherwise things like e.g.

Sun Apr  5 09:35:55 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_events_pending): take expired timeouts into
                account, otherwise things like e.g. spin-buttons don't work.
                        also, count gtk_main_quit() as an event.
parent 6e28c400
Sun Apr 5 09:35:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_events_pending): take expired timeouts into
account, otherwise things like e.g. spin-buttons don't work.
also, count gtk_main_quit() as an event.
Sun Apr 5 08:03:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtkspinbutton.c: fixed panel allocation and stacking order,
......
Sun Apr 5 09:35:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_events_pending): take expired timeouts into
account, otherwise things like e.g. spin-buttons don't work.
also, count gtk_main_quit() as an event.
Sun Apr 5 08:03:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtkspinbutton.c: fixed panel allocation and stacking order,
......
Sun Apr 5 09:35:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_events_pending): take expired timeouts into
account, otherwise things like e.g. spin-buttons don't work.
also, count gtk_main_quit() as an event.
Sun Apr 5 08:03:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtkspinbutton.c: fixed panel allocation and stacking order,
......
Sun Apr 5 09:35:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_events_pending): take expired timeouts into
account, otherwise things like e.g. spin-buttons don't work.
also, count gtk_main_quit() as an event.
Sun Apr 5 08:03:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtkspinbutton.c: fixed panel allocation and stacking order,
......
Sun Apr 5 09:35:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_events_pending): take expired timeouts into
account, otherwise things like e.g. spin-buttons don't work.
also, count gtk_main_quit() as an event.
Sun Apr 5 08:03:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtkspinbutton.c: fixed panel allocation and stacking order,
......
Sun Apr 5 09:35:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_events_pending): take expired timeouts into
account, otherwise things like e.g. spin-buttons don't work.
also, count gtk_main_quit() as an event.
Sun Apr 5 08:03:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtkspinbutton.c: fixed panel allocation and stacking order,
......
Sun Apr 5 09:35:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_events_pending): take expired timeouts into
account, otherwise things like e.g. spin-buttons don't work.
also, count gtk_main_quit() as an event.
Sun Apr 5 08:03:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtkspinbutton.c: fixed panel allocation and stacking order,
......
......@@ -419,13 +419,38 @@ gtk_main_quit ()
gint
gtk_events_pending (void)
{
gint result = gdk_events_pending() + ((next_event != NULL) ? 1 : 0);
gint result = 0;
/* if this function is called from a timeout which will only return
* if gtk needs processor time, we need to take iteration_done==TRUE
* into account as well.
*/
result = iteration_done;
result += next_event != NULL;
result += gdk_events_pending();
if (idle_functions &&
(((GtkIdleFunction *)idle_functions->data)->priority <=
GTK_PRIORITY_INTERNAL))
result += 1;
result += current_idles != NULL;
result += current_timeouts != NULL;
if (!result)
{
result += (idle_functions &&
(((GtkIdleFunction *)idle_functions->data)->priority <=
GTK_PRIORITY_INTERNAL));
}
if (!result && timeout_functions)
{
guint32 the_time;
GtkTimeoutFunction *timeoutf;
the_time = gdk_time_get ();
timeoutf = timeout_functions->data;
result += timeoutf->interval <= (the_time - timeoutf->start);
}
return result;
}
......@@ -1395,7 +1420,7 @@ gtk_handle_timeouts ()
}
if (current_timeouts)
gtk_handle_current_timeouts(the_time);
gtk_handle_current_timeouts (the_time);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment