After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606655 - Flicker when exposing (window background shows through)
Flicker when exposing (window background shows through)
Status: RESOLVED INCOMPLETE
Product: vte
Classification: Core
Component: general
0.22.x
Other All
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
: 607480 666328 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-01-11 18:37 UTC by Federico Mena Quintero
Modified: 2018-06-19 18:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Federico Mena Quintero 2010-01-11 18:37:38 UTC
Start with a non-composited window manager.

Make a maximized VTE window.  Use a light-colored theme.  Set a dark background for the terminal and make it slightly transparent (i.e. very opaque).

Flip desktops back and forth.  You'll see that X paints a light background for the VTE window, and then the terminal gets repainted with its dark background.

It seems that VTE is not setting gdk_window_set_background() or something, as that kind of flicker can be mostly avoided.
Comment 1 Christian Persch 2010-01-11 18:59:30 UTC
Same as bug 534526 ?
Comment 2 Federico Mena Quintero 2010-01-11 20:37:02 UTC
(In reply to comment #1)
> Same as bug 534526 ?

Not quite.  In that one, the textual content of the terminal flickers when you resize it; that's just a bad repainting policy.  You *can* also see the X window background being painted really quickly when you resize a corner; that would be the same case as this bug.

This bug is about the following sequence when you expose the window:

1. X paints a (possibly light-colored) background
2. VTE repaints its (possibly dark) background

The result is a lot of visible flicker when you switch desktops, as the terminal's final background can be quite different from the background that X paints by default.
Comment 3 Behdad Esfahbod 2010-01-12 06:05:11 UTC
I tried the following patch, but it didn't help.  g-t may need a similar change?  Donno.

diff --git a/src/vte.c b/src/vte.c
index a85f398..2206002 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8538,6 +8538,7 @@ vte_terminal_realize(GtkWidget *widget)
        widget->window = gdk_window_new(gtk_widget_get_parent_window(widget),
                                        &attributes,
                                        attributes_mask);
+       gdk_window_set_back_pixmap (widget->window, NULL, 0); /* We draw our own background */
        _VTE_DEBUG_IF(VTE_DEBUG_UPDATES) gdk_window_set_debug_updates(TRUE);
        gdk_window_set_user_data(widget->window, widget);
Comment 4 Behdad Esfahbod 2010-01-19 23:10:15 UTC
*** Bug 607480 has been marked as a duplicate of this bug. ***
Comment 5 Behdad Esfahbod 2011-02-10 20:00:38 UTC
I've already "fixed" that by setting the X background color to that of the vte widget.  But that's really a hack.

In gtk3 world we would remove our own color handling and rely on GtkStyleContext solely, so this would be a bit different.
Comment 6 Christian Persch 2011-05-26 21:35:25 UTC
Would making vte use an INPUT_ONLY window fix this?
Comment 7 Christian Persch 2012-01-04 15:46:10 UTC
*** Bug 666328 has been marked as a duplicate of this bug. ***
Comment 8 Christian Persch 2014-04-27 07:54:41 UTC
Still reproducible on vte master ?