[maemo-commits] [maemo-commits] r17995 - in projects/haf/trunk/gtk+: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Apr 2 14:18:29 EEST 2009
Author: kris
Date: 2009-04-02 14:18:27 +0300 (Thu, 02 Apr 2009)
New Revision: 17995

Modified:
   projects/haf/trunk/gtk+/ChangeLog
   projects/haf/trunk/gtk+/gtk/gtktextview.c
Log:
2009-04-02  Kristian Rietveld  <kris at imendio.com>

	Fixes: NB#92963 - gtk_text_view_validate_onscreen: assertion failed:
	(text_view->onscreen_validated).

	* gtk/gtktextview.c (gtk_text_view_value_changed): also update the
	IM spot location before running _validate_onscreen() since updating
	the IM spot location might invalidate the layout.



Modified: projects/haf/trunk/gtk+/ChangeLog
===================================================================
--- projects/haf/trunk/gtk+/ChangeLog	2009-04-02 11:10:50 UTC (rev 17994)
+++ projects/haf/trunk/gtk+/ChangeLog	2009-04-02 11:18:27 UTC (rev 17995)
@@ -1,3 +1,12 @@
+2009-04-02  Kristian Rietveld  <kris at imendio.com>
+
+	Fixes: NB#92963 - gtk_text_view_validate_onscreen: assertion failed:
+	(text_view->onscreen_validated).
+
+	* gtk/gtktextview.c (gtk_text_view_value_changed): also update the
+	IM spot location before running _validate_onscreen() since updating
+	the IM spot location might invalidate the layout.
+
 2009-03-27  Kristian Rietveld  <kris at imendio.com>
 
 	Fixes: NB#106323 - Remove explicit 5px margin from GtkTreeView action

Modified: projects/haf/trunk/gtk+/gtk/gtktextview.c
===================================================================
--- projects/haf/trunk/gtk+/gtk/gtktextview.c	2009-04-02 11:10:50 UTC (rev 17994)
+++ projects/haf/trunk/gtk+/gtk/gtktextview.c	2009-04-02 11:18:27 UTC (rev 17995)
@@ -7209,6 +7209,11 @@
    * first_validate_idle shouldn't have anything to do.
    */
   gtk_text_view_update_layout_width (text_view);
+
+  /* We also update the IM spot location here, since the im context
+   * might do something that leads to validation.
+   */
+  gtk_text_view_update_im_spot_location (text_view);
   
   /* note that validation of onscreen could invoke this function
    * recursively, by scrolling to maintain first_para, or in response
@@ -7244,6 +7249,9 @@
       text_view->first_validate_idle = 0;
     }
 
+  /* Finally we update the IM cursor location again, to ensure any
+   * changes made by the validation are pushed through.
+   */
   gtk_text_view_update_im_spot_location (text_view);
   
   DV(g_print(">End scroll offset changed handler ("G_STRLOC")\n"));


More information about the maemo-commits mailing list