[gtkhtml] Add comments around g_idle_add() changes
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml] Add comments around g_idle_add() changes
- Date: Fri, 8 Feb 2013 16:19:46 +0000 (UTC)
commit 49da155b7e1277d14552629c465a82244d5da6a4
Author: Milan Crha <mcrha redhat com>
Date: Fri Feb 8 17:18:35 2013 +0100
Add comments around g_idle_add() changes
gtkhtml/gtkhtml.c | 1 +
gtkhtml/htmlengine-edit-selection-updater.c | 1 +
gtkhtml/htmlengine.c | 4 ++++
3 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index 58ea5dc..2098a4e 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -452,6 +452,7 @@ queue_draw (GtkHTML *html)
{
if (html->priv->idle_handler_id == 0)
html->priv->idle_handler_id =
+ /* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
g_idle_add_full (G_PRIORITY_HIGH_IDLE, idle_handler, html, NULL);
}
diff --git a/gtkhtml/htmlengine-edit-selection-updater.c b/gtkhtml/htmlengine-edit-selection-updater.c
index 3b6c0fd..7d039bc 100644
--- a/gtkhtml/htmlengine-edit-selection-updater.c
+++ b/gtkhtml/htmlengine-edit-selection-updater.c
@@ -114,6 +114,7 @@ html_engine_edit_selection_updater_schedule (HTMLEngineEditSelectionUpdater *upd
if (updater->idle_id != 0)
return;
+ /* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
updater->idle_id = g_idle_add_full (G_PRIORITY_HIGH_IDLE, updater_idle_callback, updater, NULL);
}
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index d24bcb1..3da70b5 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -5075,6 +5075,7 @@ html_engine_schedule_update (HTMLEngine *e)
return;
DI (printf ("html_engine_schedule_update - timer %d\n", e->updateTimer));
if (e->updateTimer == 0)
+ /* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
e->updateTimer = g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) html_engine_update_event, e, NULL);
}
@@ -5382,6 +5383,7 @@ html_engine_schedule_redraw (HTMLEngine *e)
else if (e->redraw_idle_id == 0) {
clear_pending_expose (e);
html_draw_queue_clear (e->draw_queue);
+ /* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
e->redraw_idle_id = g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) redraw_idle, e, NULL);
}
}
@@ -5598,6 +5600,7 @@ html_engine_parse (HTMLEngine *e)
e->avoid_para = FALSE;
+ /* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
e->timerId = g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) html_engine_timer_event, e, NULL);
}
@@ -6202,6 +6205,7 @@ html_engine_thaw (HTMLEngine *engine)
if (engine->freeze_count == 1) {
if (engine->thaw_idle_id == 0) {
DF (printf ("queueing thaw_idle %d\n", engine->freeze_count);)
+ /* schedule with priority higher than gtk+ uses for animations (check docs for G_PRIORITY_HIGH_IDLE) */
engine->thaw_idle_id = g_idle_add_full (G_PRIORITY_HIGH_IDLE, thaw_idle, engine, NULL);
}
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]