[evolution-patches] [gtkhtml] #62483 wrong cursor rectangle
- From: Radek Doulík <rodo novell com>
- To: Patches <evolution-patches ximian com>
- Cc: Larry Ewing <lewing ximian com>
- Subject: [evolution-patches] [gtkhtml] #62483 wrong cursor rectangle
- Date: Tue, 10 Aug 2004 19:42:08 +0200
attached patch fixes problem reported in #62483
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2028
diff -u -p -r1.2028 ChangeLog
--- ChangeLog 4 Aug 2004 09:12:43 -0000 1.2028
+++ ChangeLog 10 Aug 2004 17:40:17 -0000
@@ -1,4 +1,33 @@
+2004-08-10 Radek Doulik <rodo ximian com>
+
+ * htmlengine-edit-cursor.c (refresh_under_cursor): do not refresh
+ cursor rectangle with negative width or height
+ (draw_cursor_rectangle): do not draw cursor rectangle with
+ negative width or height
+
+ Fixes (partialy) #62483
* htmltext.c (html_text_set_style_in_range): avoid setting default
font size
Index: htmlengine-edit-cursor.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine-edit-cursor.c,v
retrieving revision 1.26
diff -u -p -r1.26 htmlengine-edit-cursor.c
--- htmlengine-edit-cursor.c 12 Dec 2003 07:22:22 -0000 1.26
+++ htmlengine-edit-cursor.c 10 Aug 2004 17:40:17 -0000
@@ -117,6 +117,9 @@ draw_cursor_rectangle (HTMLEngine *e, gi
GdkColor color;
gint8 dashes [2] = { 1, 3 };
+ if (x1 > x2 || y1 > y2)
+ return;
+
gc = gdk_gc_new (e->window);
color = *on_color;
gdk_rgb_find_color (gdk_drawable_get_colormap (e->window), &color);
@@ -135,6 +138,9 @@ static gint cursor_enabled = TRUE;
static inline void
refresh_under_cursor (HTMLEngine *e, HTMLCursorRectangle *cr, gboolean *enabled)
{
+ if (cr->x1 > cr->x2 || cr->y1 > cr->y2)
+ return;
+
*enabled = cursor_enabled = FALSE;
html_engine_draw (e, cr->x1, cr->y1,
cr->x2 - cr->x1 + 1, cr->y2 - cr->y1 + 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]