GNOME Bugzilla – Bug 160782
Vte isn't multi-screen safe
Last modified: 2006-04-22 21:34:08 UTC
Start Xnest :1, compile and run the following simple program. vtexft seems to perform a XCopyArea operation with the background pixmap from the first display. This bug causes real terminal emulators to crash if the users uses transparent or pixmap backgrounds. #include <vte/vte.h> static void open (GdkScreen *screen) { GtkWidget *window, *terminal; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_screen (GTK_WINDOW (window), screen); terminal = vte_terminal_new (); vte_terminal_set_background_transparent (VTE_TERMINAL (terminal), TRUE); gtk_container_add (GTK_CONTAINER (window), terminal); gtk_widget_show_all (window); } int main (int argc, char **argv) { gtk_init (&argc, &argv); open (gdk_display_get_screen (gdk_display_open (":0"), 0)); open (gdk_display_get_screen (gdk_display_open (":1"), 0)); gtk_main (); return 0; }
Man, we so need a maintainer for vte... *sigh*
Created attachment 34914 [details] [review] Proposed patch This patch fixes the problem, while still maintaining compatbility with Gtk 2.0. Could anyone please see to this patch and apply it? It would be nice if this could be in the vte release.
This patch fixes it for me. Without it you get: Gdk-ERROR **: The program 'vtetest' received an X Window System error. This probably reflects a bug in the program. The error was 'BadDrawable (invalid Pixmap or Window parameter)'. (Details: serial 181 error_code 9 request_code 62 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) aborting... Trace/breakpoint trap
2006-04-22 Behdad Esfahbod <behdad@gnome.org> Bug 160782 – Vte isn't multi-screen safe Patch from Benedikt Meurer. * src/vte.c (vte_terminal_unrealize), (vte_terminal_realize): * src/vtebg.c (vte_bg_native_new), (_vte_bg_display_sync), (vte_bg_root_pixmap), (vte_bg_get_for_screen), (vte_bg_init), (vte_bg_get_pixmap), (vte_bg_get_pixbuf): * src/vtebg.h: * src/vteft2.c (_vte_ft2_set_background_image): * src/vtegl.c (_vte_gl_set_background_image): * src/vtepango.c (_vte_pango_set_background_image): * src/vtepangox.c (_vte_pango_x_set_background_image): * src/vtexft.c (_vte_xft_set_background_image): Handle per-screen backgrounds.