vte r2376 - in trunk: . src



Author: chpe
Date: Mon Mar  2 20:14:07 2009
New Revision: 2376
URL: http://svn.gnome.org/viewvc/vte?rev=2376&view=rev

Log:
	* src/vteaccess.c: (vte_terminal_accessible_set_size),
	(vte_terminal_accessible_ref_accessible_at_point):
	* src/vteapp.c: (button_pressed): Correct use of padding returned
        by vte_terminal_get_padding().

Modified:
   trunk/ChangeLog
   trunk/src/vteaccess.c
   trunk/src/vteapp.c

Modified: trunk/src/vteaccess.c
==============================================================================
--- trunk/src/vteaccess.c	(original)
+++ trunk/src/vteaccess.c	Mon Mar  2 20:14:07 2009
@@ -1775,16 +1775,8 @@
 	vte_terminal_get_padding(terminal, &xpad, &ypad);
 	/* If the size is an exact multiple of the cell size, use that,
 	 * otherwise round down. */
-	if (width % terminal->char_width == 0) {
-		columns = width / terminal->char_width;
-	} else {
-		columns = (width + xpad) / terminal->char_width;
-	}
-	if (height % terminal->char_height == 0) {
-		rows = height / terminal->char_height;
-	} else {
-		rows = (height + xpad) / terminal->char_height;
-	}
+        columns = (width - xpad) / terminal->char_width;
+        rows = (height - ypad) / terminal->char_height;
 	vte_terminal_set_size(terminal, columns, rows);
 	return (terminal->row_count == rows) &&
 	       (terminal->column_count == columns);

Modified: trunk/src/vteapp.c
==============================================================================
--- trunk/src/vteapp.c	(original)
+++ trunk/src/vteapp.c	Mon Mar  2 20:14:07 2009
@@ -174,9 +174,9 @@
 		terminal = VTE_TERMINAL(widget);
 		vte_terminal_get_padding(terminal, &xpad, &ypad);
 		match = vte_terminal_match_check(terminal,
-						 (event->x - ypad) /
+						 (event->x - xpad / 2) /
 						 terminal->char_width,
-						 (event->y - ypad) /
+						 (event->y - ypad / 2) /
 						 terminal->char_height,
 						 &tag);
 		if (match != NULL) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]