[Fwd: vte no flashy no more]



Sent this to the wrong list.
Doh.
iain
-------- Forwarded Message --------To:  Header goes here

Hi,

Attached is a small patch to make the annoying flicker when you move a
gnome-terminal around the screen. The problem was that on a configure
event the whole window was being redrawn even if it didn't need to be.

The cases where I figure that no redraw is necessary is if the width and
height haven't changed and the background isn't transparent. All other
cases cause the same full redraw.

May I commit?

iain

________________________________________________________________________
-- 
Index: src/vte.c
===================================================================
RCS file: /cvs/gnome/vte/src/vte.c,v
retrieving revision 1.385
diff -u -p -r1.385 vte.c
--- src/vte.c	15 Sep 2003 18:51:29 -0000	1.385
+++ src/vte.c	25 Dec 2003 19:43:55 -0000
@@ -8100,6 +8100,8 @@ static gboolean
 vte_terminal_configure_toplevel(GtkWidget *widget, GdkEventConfigure *event,
 				gpointer data)
 {
+	VteTerminal *vte;
+	
 #ifdef VTE_DEBUG
 	if (_vte_debug_on(VTE_DEBUG_EVENTS)) {
 		fprintf(stderr, "Top level parent configured.\n");
@@ -8109,6 +8111,14 @@ vte_terminal_configure_toplevel(GtkWidge
 	g_return_val_if_fail(GTK_WIDGET_TOPLEVEL(widget), FALSE);
 	g_return_val_if_fail(VTE_IS_TERMINAL(data), FALSE);
 
+	vte = VTE_TERMINAL (data);
+	
+	if (event->width == widget->allocation.width &&
+	    event->height == widget->allocation.height &&
+	    vte->pvt->bg_transparent == FALSE) {
+		return;
+	}
+
 	/* In case we were resized, repaint everything, including any border
 	 * regions which no cell covers. */
 	vte_invalidate_all(VTE_TERMINAL(data));


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