Fixed a sign problem (typedef gint guint!). Added some checks to make sure

Sat Apr 11 01:41:55 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtktext.c (expose_text): Fixed a sign problem
	(typedef gint guint!). Added some checks to make sure things
	are positive.
This commit is contained in:
Owen Taylor 1998-04-11 05:50:16 +00:00 committed by Owen Taylor
parent 9c585e9210
commit 6114e5b813
8 changed files with 45 additions and 3 deletions

View File

@ -1,3 +1,9 @@
Sat Apr 11 01:41:55 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktext.c (expose_text): Fixed a sign problem
(typedef gint guint!). Added some checks to make sure things
are positive.
Sat Apr 11 05:51:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.c (gtk_tooltips_event_handler): don't shut down the

View File

@ -1,3 +1,9 @@
Sat Apr 11 01:41:55 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktext.c (expose_text): Fixed a sign problem
(typedef gint guint!). Added some checks to make sure things
are positive.
Sat Apr 11 05:51:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.c (gtk_tooltips_event_handler): don't shut down the

View File

@ -1,3 +1,9 @@
Sat Apr 11 01:41:55 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktext.c (expose_text): Fixed a sign problem
(typedef gint guint!). Added some checks to make sure things
are positive.
Sat Apr 11 05:51:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.c (gtk_tooltips_event_handler): don't shut down the

View File

@ -1,3 +1,9 @@
Sat Apr 11 01:41:55 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktext.c (expose_text): Fixed a sign problem
(typedef gint guint!). Added some checks to make sure things
are positive.
Sat Apr 11 05:51:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.c (gtk_tooltips_event_handler): don't shut down the

View File

@ -1,3 +1,9 @@
Sat Apr 11 01:41:55 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktext.c (expose_text): Fixed a sign problem
(typedef gint guint!). Added some checks to make sure things
are positive.
Sat Apr 11 05:51:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.c (gtk_tooltips_event_handler): don't shut down the

View File

@ -1,3 +1,9 @@
Sat Apr 11 01:41:55 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktext.c (expose_text): Fixed a sign problem
(typedef gint guint!). Added some checks to make sure things
are positive.
Sat Apr 11 05:51:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.c (gtk_tooltips_event_handler): don't shut down the

View File

@ -1,3 +1,9 @@
Sat Apr 11 01:41:55 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktext.c (expose_text): Fixed a sign problem
(typedef gint guint!). Added some checks to make sure things
are positive.
Sat Apr 11 05:51:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.c (gtk_tooltips_event_handler): don't shut down the

View File

@ -4466,8 +4466,8 @@ expose_text (GtkText* text, GdkRectangle *area, gboolean cursor)
{
GList *cache = text->line_start_cache;
gint pixels = - text->first_cut_pixels;
gint min_y = area->y;
gint max_y = area->y + area->height;
gint min_y = MAX (0, area->y);
gint max_y = MAX (0, area->y + area->height);
gint height;
gdk_window_get_size (text->text_area, NULL, &height);
@ -4479,7 +4479,7 @@ expose_text (GtkText* text, GdkRectangle *area, gboolean cursor)
for (; pixels < height; cache = cache->next)
{
if (pixels < max_y && (pixels + LINE_HEIGHT(CACHE_DATA(cache))) >= min_y)
if (pixels < max_y && (pixels + (gint)LINE_HEIGHT(CACHE_DATA(cache))) >= min_y)
{
draw_line (text, pixels, &CACHE_DATA(cache));