[cairo-commit] goocanvas/src goocanvasview.c,1.18,1.19

Damon Chaplin commit at pdx.freedesktop.org
Sun Apr 23 07:01:17 PDT 2006


Committed by: damon

Update of /cvs/cairo/goocanvas/src
In directory kemper:/tmp/cvs-serv1966/src

Modified Files:
	goocanvasview.c 
Log Message:
	(goo_canvas_view_focus_check_is_best): try to avoid wild jumps when
	moving around with the cursor keys.



Index: goocanvasview.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasview.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- goocanvasview.c	23 Apr 2006 13:43:41 -0000	1.18
+++ goocanvasview.c	23 Apr 2006 14:01:15 -0000	1.19
@@ -2266,7 +2266,7 @@
     {
     case GTK_DIR_UP:
       /* If the y offset is > 0 we can discard this item view. */
-      if (data->current_y_offset >= 0)
+      if (data->current_y_offset >= 0 || abs_x_offset > abs_y_offset)
 	return FALSE;
 
       /* Compute a score (lower is best) and check if it is the best. */
@@ -2277,7 +2277,7 @@
 
     case GTK_DIR_DOWN:
       /* If the y offset is < 0 we can discard this item view. */
-      if (data->current_y_offset <= 0)
+      if (data->current_y_offset <= 0 || abs_x_offset > abs_y_offset)
 	return FALSE;
 
       /* Compute a score (lower is best) and check if it is the best. */
@@ -2288,7 +2288,7 @@
 
     case GTK_DIR_LEFT:
       /* If the x offset is > 0 we can discard this item view. */
-      if (data->current_x_offset >= 0)
+      if (data->current_x_offset >= 0 || abs_y_offset > abs_x_offset)
 	return FALSE;
 
       /* Compute a score (lower is best) and check if it is the best. */
@@ -2299,7 +2299,7 @@
 
     case GTK_DIR_RIGHT:
       /* If the x offset is < 0 we can discard this item view. */
-      if (data->current_x_offset <= 0)
+      if (data->current_x_offset <= 0 || abs_y_offset > abs_x_offset)
 	return FALSE;
 
       /* Compute a score (lower is best) and check if it is the best. */



More information about the cairo-commit mailing list