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 160782 - Vte isn't multi-screen safe
Vte isn't multi-screen safe
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.11.x
Other FreeBSD
: High critical
: ---
Assigned To: Behdad Esfahbod
Nalin Dahyabhai
Depends on:
Blocks:
 
 
Reported: 2004-12-08 17:18 UTC by Benedikt Meurer
Modified: 2006-04-22 21:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (11.53 KB, patch)
2004-12-16 21:34 UTC, Benedikt Meurer
committed Details | Review

Description Benedikt Meurer 2004-12-08 17:18:06 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;
}
Comment 1 Elijah Newren 2004-12-08 17:48:27 UTC
Man, we so need a maintainer for vte...  *sigh*
Comment 2 Benedikt Meurer 2004-12-16 21:34:14 UTC
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.
Comment 3 Michele Baldessari 2005-07-08 21:51:43 UTC
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
Comment 4 Behdad Esfahbod 2006-04-22 21:34:08 UTC
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.