summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-03-14 11:05:24 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-03-14 11:05:24 +0000
commitc746aa5bf1ff72eee324811989216e8351a88ee3 (patch)
treed842717531276007f58ec6c5da6664bd295434ea
parent6988cdf18b96e0f42eb9c95f8e501305a2cc2f0d (diff)
More tweaks to the previous changes. Reported by dholbach again.
2006-03-14 Behdad Esfahbod <behdad@gnome.org> * src/vte.c (vte_terminal_size_allocate): More tweaks to the previous changes. Reported by dholbach again.
-rw-r--r--ChangeLog7
-rw-r--r--src/vte.c50
2 files changed, 27 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index e8d3992..f07c000 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,13 @@
+2006-03-14 Behdad Esfahbod <behdad@gnome.org>
+
+ * src/vte.c (vte_terminal_size_allocate): More tweaks to the
+ previous changes. Reported by dholbach again.
+
2006-03-13 Behdad Esfahbod <behdad@gnome.org>
* src/vte.c (vte_terminal_size_allocate): Put the stuff changed in
previous commit in their original order. Problem reported by
- dholback.
+ dholbach.
2006-03-13 Behdad Esfahbod <behdad@gnome.org>
diff --git a/src/vte.c b/src/vte.c
index a491d38..30ee451 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -6876,7 +6876,6 @@ vte_terminal_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
glong width, height;
gint x, y, w, h;
gboolean snapped_to_bottom;
- gboolean grid_changed;
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_LIFECYCLE)) {
@@ -6897,9 +6896,6 @@ vte_terminal_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
height = (allocation->height - (2 * VTE_PAD_WIDTH)) /
terminal->char_height;
- grid_changed = terminal->column_count != width ||
- terminal->row_count != height;
-
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_MISC)) {
fprintf(stderr, "Sizing window to %dx%d (%ldx%ld).\n",
@@ -6911,27 +6907,25 @@ vte_terminal_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
/* Set our allocation to match the structure. */
widget->allocation = *allocation;
- if (grid_changed) {
- /* Set the size of the pseudo-terminal. */
- vte_terminal_set_size(terminal, width, height);
-
- /* Adjust scrolling area in case our boundaries have just been
- * redefined to be invalid. */
- if (terminal->pvt->screen->scrolling_restricted) {
- terminal->pvt->screen->scrolling_region.start =
- MIN(terminal->pvt->screen->scrolling_region.start,
- terminal->row_count - 1);
- terminal->pvt->screen->scrolling_region.end =
- MIN(terminal->pvt->screen->scrolling_region.end,
- terminal->row_count - 1);
- }
+ /* Set the size of the pseudo-terminal. */
+ vte_terminal_set_size(terminal, width, height);
- /* Adjust scrollback buffers to ensure that they're big enough. */
- vte_terminal_set_scrollback_lines(terminal,
- MAX(terminal->pvt->scrollback_lines,
- terminal->row_count));
+ /* Adjust scrolling area in case our boundaries have just been
+ * redefined to be invalid. */
+ if (terminal->pvt->screen->scrolling_restricted) {
+ terminal->pvt->screen->scrolling_region.start =
+ MIN(terminal->pvt->screen->scrolling_region.start,
+ terminal->row_count - 1);
+ terminal->pvt->screen->scrolling_region.end =
+ MIN(terminal->pvt->screen->scrolling_region.end,
+ terminal->row_count - 1);
}
+ /* Adjust scrollback buffers to ensure that they're big enough. */
+ vte_terminal_set_scrollback_lines(terminal,
+ MAX(terminal->pvt->scrollback_lines,
+ terminal->row_count));
+
/* Resize the GDK window. */
if (widget->window != NULL) {
gdk_window_get_geometry(widget->window,
@@ -6950,15 +6944,13 @@ vte_terminal_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
}
}
- if (grid_changed) {
- /* Adjust the adjustments. */
- _vte_terminal_adjust_adjustments(terminal, TRUE);
+ /* Adjust the adjustments. */
+ _vte_terminal_adjust_adjustments(terminal, TRUE);
- _vte_terminal_update_insert_delta (terminal);
+ _vte_terminal_update_insert_delta (terminal);
- if (snapped_to_bottom) {
- vte_terminal_maybe_scroll_to_bottom (terminal);
- }
+ if (snapped_to_bottom) {
+ vte_terminal_maybe_scroll_to_bottom (terminal);
}
}