GNOME Bugzilla – Bug 594895
Terminal contents do not always display when widget is initially opened
Last modified: 2009-09-11 15:44:27 UTC
This bug is present in libvte 0.16.13 (in Ubuntu hardy) but it has been fixed by 0.20.5 (in Ubuntu karmic). I am recording it here for reference. If a VTE widget is created, shown and fed data, the data does not always get displayed. The widget displays nothing except for the cursor in the top-left corner, and the scrollbar range is uninitialised. This seems to happen when the widget has not participated in widget resizing. If the window is resized, the VTE widget's contents then display correctly. Feeding more data to the terminal (after a delay) also fixes the display. The following program demonstrates the problem: import gobject import gtk import vte def make(): terminal = vte.Terminal() scrollbar = gtk.VScrollbar() scrollbar.set_adjustment(terminal.get_adjustment()) hbox = gtk.HBox() hbox.add(terminal) hbox.add(scrollbar) hbox.show_all() terminal.feed("hello world\n\r") # Feeding more text after a delay fixes the widget's display: # gobject.timeout_add(1000, lambda: terminal.feed("hello world\n\r")) return hbox win = gtk.Window() t = make() win.add(t) win.show_all() win.remove(t) gobject.timeout_add(1000, lambda: win.add(make())) gtk.main()