[gtkhtml/gnome-3-6] Bug #683867 - Schedule actions with higher idle priority



commit 674696986c6fd9f7b636dc759cfab11b5ad10d18
Author: Michel DÃnzer <michel daenzer net>
Date:   Fri Feb 8 12:12:16 2013 +0100

    Bug #683867 - Schedule actions with higher idle priority

 gtkhtml/gtkhtml.c                           |    3 ++-
 gtkhtml/htmlengine-edit-selection-updater.c |    2 +-
 gtkhtml/htmlengine.c                        |    8 ++++----
 3 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index 8a14e10..58ea5dc 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -451,7 +451,8 @@ static void
 queue_draw (GtkHTML *html)
 {
 	if (html->priv->idle_handler_id == 0)
-		html->priv->idle_handler_id = g_idle_add (idle_handler, html);
+		html->priv->idle_handler_id =
+			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 4887225..3b6c0fd 100644
--- a/gtkhtml/htmlengine-edit-selection-updater.c
+++ b/gtkhtml/htmlengine-edit-selection-updater.c
@@ -114,7 +114,7 @@ html_engine_edit_selection_updater_schedule (HTMLEngineEditSelectionUpdater *upd
 	if (updater->idle_id != 0)
 		return;
 
-	updater->idle_id = g_idle_add (updater_idle_callback, updater);
+	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 c530151..d24bcb1 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -5075,7 +5075,7 @@ html_engine_schedule_update (HTMLEngine *e)
 		return;
 	DI (printf ("html_engine_schedule_update - timer %d\n", e->updateTimer));
 	if (e->updateTimer == 0)
-		e->updateTimer = g_idle_add ((GSourceFunc) html_engine_update_event, e);
+		e->updateTimer = g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) html_engine_update_event, e, NULL);
 }
 
 
@@ -5382,7 +5382,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);
-		e->redraw_idle_id = g_idle_add ((GSourceFunc) redraw_idle, e);
+		e->redraw_idle_id = g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) redraw_idle, e, NULL);
 	}
 }
 
@@ -5598,7 +5598,7 @@ html_engine_parse (HTMLEngine *e)
 
 	e->avoid_para = FALSE;
 
-	e->timerId = g_idle_add ((GSourceFunc) html_engine_timer_event, e);
+	e->timerId = g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) html_engine_timer_event, e, NULL);
 }
 
 
@@ -6202,7 +6202,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);)
-			engine->thaw_idle_id = g_idle_add (thaw_idle, engine);
+			engine->thaw_idle_id = g_idle_add_full (G_PRIORITY_HIGH_IDLE, thaw_idle, engine, NULL);
 		}
 	} else {
 		engine->freeze_count--;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]