[gtk] demo: Don't add more icons all the time
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] demo: Don't add more icons all the time
- Date: Sun, 22 Apr 2018 01:18:33 +0000 (UTC)
commit c5bcc47ce798a160aa851b623ed9411f1e461f62
Author: Benjamin Otte <otte redhat com>
Date: Sun Apr 22 02:45:11 2018 +0200
demo: Don't add more icons all the time
If adding new icons takes longer than a second, the frame clock should
run before we add even more icons...
demos/gtk-demo/fishbowl.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/demos/gtk-demo/fishbowl.c b/demos/gtk-demo/fishbowl.c
index 689874da5e..7aeaf3206e 100644
--- a/demos/gtk-demo/fishbowl.c
+++ b/demos/gtk-demo/fishbowl.c
@@ -190,9 +190,11 @@ do_fishbowl (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_widget_realize (window);
- g_timeout_add_seconds (1,
- move_fish,
- bowl);
+ g_timeout_add_seconds_full (G_PRIORITY_DEFAULT_IDLE,
+ 1,
+ move_fish,
+ bowl,
+ NULL);
}
if (!gtk_widget_get_visible (window))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]