gtkhtml r9197 - trunk/gtkhtml
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkhtml r9197 - trunk/gtkhtml
- Date: Thu, 9 Apr 2009 14:17:18 +0000 (UTC)
Author: mcrha
Date: Thu Apr 9 14:17:18 2009
New Revision: 9197
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=9197&view=rev
Log:
2009-04-09 Milan Crha <mcrha redhat com>
** Fix for bug #494986
* gtkhtml-private.h: (struct _GtkHTMLPrivate):
* gtkhtml.c: (idle_handler), (html_engine_draw_pending_cb),
(button_release_event), (gtk_html_init):
Do not centre to cursor position on click over URL and draw event.
Modified:
trunk/gtkhtml/ChangeLog
trunk/gtkhtml/gtkhtml-private.h
trunk/gtkhtml/gtkhtml.c
Modified: trunk/gtkhtml/gtkhtml-private.h
==============================================================================
--- trunk/gtkhtml/gtkhtml-private.h (original)
+++ trunk/gtkhtml/gtkhtml-private.h Thu Apr 9 14:17:18 2009
@@ -36,6 +36,7 @@
GtkHTMLFontStyle insertion_font_style;
gboolean update_styles;
+ gboolean skip_update_cursor;
gint selection_type;
Modified: trunk/gtkhtml/gtkhtml.c
==============================================================================
--- trunk/gtkhtml/gtkhtml.c (original)
+++ trunk/gtkhtml/gtkhtml.c Thu Apr 9 14:17:18 2009
@@ -378,21 +378,27 @@
{
GtkHTML *html;
HTMLEngine *engine;
+ gboolean also_update_cursor;
html = GTK_HTML (data);
engine = html->engine;
+ also_update_cursor = !html->priv->skip_update_cursor;
+
if (html->engine->thaw_idle_id == 0 && !html_engine_frozen (html->engine))
html_engine_flush_draw_queue (engine);
- gtk_html_adjust_cursor_position (html);
-
+ if (also_update_cursor)
+ gtk_html_adjust_cursor_position (html);
html->priv->idle_handler_id = 0;
+ html->priv->skip_update_cursor = FALSE;
- while (html->iframe_parent) {
- html = GTK_HTML (html->iframe_parent);
- gtk_html_adjust_cursor_position (html);
+ if (also_update_cursor) {
+ while (html->iframe_parent) {
+ html = GTK_HTML (html->iframe_parent);
+ gtk_html_adjust_cursor_position (html);
+ }
}
return FALSE;
@@ -494,6 +500,7 @@
GtkHTML *html;
html = GTK_HTML (data);
+ html->priv->skip_update_cursor = TRUE;
queue_draw (html);
}
@@ -2044,6 +2051,8 @@
if (HTML_IS_TEXT (focus_object))
html_text_set_link_visited (HTML_TEXT (focus_object), (gint) offset, html->engine, TRUE);
}
+
+ html->priv->skip_update_cursor = TRUE;
}
}
@@ -3411,6 +3420,7 @@
html->priv = g_new0 (GtkHTMLPrivate, 1);
html->priv->idle_handler_id = 0;
html->priv->scroll_timeout_id = 0;
+ html->priv->skip_update_cursor = FALSE;
html->priv->paragraph_style = GTK_HTML_PARAGRAPH_STYLE_NORMAL;
html->priv->paragraph_alignment = GTK_HTML_PARAGRAPH_ALIGNMENT_LEFT;
html->priv->paragraph_indentation = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]