summaryrefslogtreecommitdiff
path: root/x11-toolkits/vte/files/patch-08_multiscreen_safe
diff options
context:
space:
mode:
Diffstat (limited to 'x11-toolkits/vte/files/patch-08_multiscreen_safe')
-rw-r--r--x11-toolkits/vte/files/patch-08_multiscreen_safe381
1 files changed, 0 insertions, 381 deletions
diff --git a/x11-toolkits/vte/files/patch-08_multiscreen_safe b/x11-toolkits/vte/files/patch-08_multiscreen_safe
deleted file mode 100644
index e4cbbd5877ed..000000000000
--- a/x11-toolkits/vte/files/patch-08_multiscreen_safe
+++ /dev/null
@@ -1,381 +0,0 @@
-diff -r -u src.orig/vtebg.h src/vtebg.h
---- src.orig/vtebg.h 2003-05-19 15:48:58 -0700
-+++ src/vtebg.h 2004-12-19 18:56:14 -0800
-@@ -30,6 +30,7 @@
- typedef struct _VteBg VteBg;
- struct _VteBg {
- GObject parent;
-+ gpointer screen;
- GdkPixmap *root_pixmap;
- struct VteBgNative *native;
- struct VteBgPrivate *pvt;
-@@ -50,7 +51,7 @@
-
- GType vte_bg_get_type(void);
-
--VteBg *vte_bg_get(void);
-+VteBg *vte_bg_get_for_screen(gpointer screen);
-
- enum VteBgSourceType {
- VTE_BG_SOURCE_NONE,
-diff -r -u src.orig/vte.c src/vte.c
---- src.orig/vte.c 2004-05-01 23:43:01 -0700
-+++ src/vte.c 2004-12-19 18:56:14 -0800
-@@ -11653,6 +11653,7 @@
- vte_terminal_unrealize(GtkWidget *widget)
- {
- VteTerminal *terminal;
-+ VteBg *bg;
-
- #ifdef VTE_DEBUG
- if (_vte_debug_on(VTE_DEBUG_LIFECYCLE)) {
-@@ -11671,7 +11672,12 @@
- terminal->pvt->draw = NULL;
-
- /* Disconnect from background-change events. */
-- g_signal_handlers_disconnect_by_func(G_OBJECT(vte_bg_get()),
-+#if GTK_CHECK_VERSION(2,2,0)
-+ bg = vte_bg_get_for_screen(gtk_widget_get_screen(widget));
-+#else
-+ bg = vte_bg_get_for_screen(NULL);
-+#endif
-+ g_signal_handlers_disconnect_by_func(G_OBJECT(bg),
- root_pixmap_changed_cb,
- widget);
-
-@@ -12007,6 +12013,7 @@
- GtkSettings *settings;
- int attributes_mask = 0, i;
- gint blink_cycle = 1000;
-+ VteBg *bg;
-
- #ifdef VTE_DEBUG
- if (_vte_debug_on(VTE_DEBUG_LIFECYCLE)) {
-@@ -12145,7 +12152,12 @@
- 0, 0);
-
- /* Connect to background-change events. */
-- g_signal_connect(G_OBJECT(vte_bg_get()),
-+#if GTK_CHECK_VERSION(2,2,0)
-+ bg = vte_bg_get_for_screen(gtk_widget_get_screen(widget));
-+#else
-+ bg = vte_bg_get_for_screen(NULL);
-+#endif
-+ g_signal_connect(G_OBJECT(bg),
- "root-pixmap-changed",
- G_CALLBACK(root_pixmap_changed_cb),
- terminal);
-diff -r -u src.orig/vteft2.c src/vteft2.c
---- src.orig/vteft2.c 2004-04-19 22:16:56 -0700
-+++ src/vteft2.c 2004-12-19 18:56:14 -0800
-@@ -166,10 +166,18 @@
- {
- struct _vte_ft2_data *data;
- GdkPixbuf *bgpixbuf;
-+ gpointer screen;
-+
-+#if GTK_CHECK_VERSION(2,2,0)
-+ screen = gtk_widget_get_screen(draw->widget);
-+#else
-+ screen = NULL;
-+#endif
-
- data = (struct _vte_ft2_data*) draw->impl_data;
-
-- bgpixbuf = vte_bg_get_pixbuf(vte_bg_get(), type, pixbuf, file,
-+ bgpixbuf = vte_bg_get_pixbuf(vte_bg_get_for_screen(screen),
-+ type, pixbuf, file,
- color, saturation);
- if (GDK_IS_PIXBUF(data->pixbuf)) {
- g_object_unref(G_OBJECT(data->pixbuf));
-diff -r -u src.orig/vtegl.c src/vtegl.c
---- src.orig/vtegl.c 2004-04-19 22:16:56 -0700
-+++ src/vtegl.c 2004-12-19 18:56:14 -0800
-@@ -279,9 +279,17 @@
- {
- struct _vte_gl_data *data;
- GdkPixbuf *bgpixbuf;
-+ gpointer screen;
-+
-+#if GTK_CHECK_VERSION(2,2,0)
-+ screen = gtk_widget_get_screen(draw->widget);
-+#else
-+ screen = NULL;
-+#endif
-
- data = (struct _vte_gl_data*) draw->impl_data;
-- bgpixbuf = vte_bg_get_pixbuf(vte_bg_get(), type, pixbuf, file,
-+ bgpixbuf = vte_bg_get_pixbuf(vte_bg_get_for_screen(screen),
-+ type, pixbuf, file,
- tint, saturation);
- if (GDK_IS_PIXBUF(data->bgpixbuf)) {
- g_object_unref(G_OBJECT(data->bgpixbuf));
-diff -r -u src.orig/vtepango.c src/vtepango.c
---- src.orig/vtepango.c 2004-04-19 22:16:56 -0700
-+++ src/vtepango.c 2004-12-19 18:56:14 -0800
-@@ -194,9 +194,17 @@
- {
- GdkPixmap *pixmap;
- struct _vte_pango_data *data;
-+ gpointer screen;
-+
-+#if GTK_CHECK_VERSION(2,2,0)
-+ screen = gtk_widget_get_screen(draw->widget);
-+#else
-+ screen = NULL;
-+#endif
-
- data = (struct _vte_pango_data*) draw->impl_data;
-- pixmap = vte_bg_get_pixmap(vte_bg_get(), type, pixbuf, file,
-+ pixmap = vte_bg_get_pixmap(vte_bg_get_for_screen(screen),
-+ type, pixbuf, file,
- color, saturation,
- _vte_draw_get_colormap(draw, TRUE));
- if (GDK_IS_PIXMAP(data->pixmap)) {
-diff -r -u src.orig/vtepangox.c src/vtepangox.c
---- src.orig/vtepangox.c 2004-04-19 22:16:56 -0700
-+++ src/vtepangox.c 2004-12-19 18:56:14 -0800
-@@ -207,9 +207,17 @@
- {
- GdkPixmap *pixmap;
- struct _vte_pango_x_data *data;
-+ gpointer screen;
-+
-+#if GTK_CHECK_VERSION(2,2,0)
-+ screen = gtk_widget_get_screen (draw->widget);
-+#else
-+ screen = NULL;
-+#endif
-
- data = (struct _vte_pango_x_data*) draw->impl_data;
-- pixmap = vte_bg_get_pixmap(vte_bg_get(), type, pixbuf, file,
-+ pixmap = vte_bg_get_pixmap(vte_bg_get_for_screen(screen),
-+ type, pixbuf, file,
- color, saturation,
- _vte_draw_get_colormap(draw, TRUE));
- if (data->pixmap) {
-diff -r -u src.orig/vtexft.c src/vtexft.c
---- src.orig/vtexft.c 2004-04-19 22:16:56 -0700
-+++ src/vtexft.c 2004-12-19 18:56:14 -0800
-@@ -451,12 +451,19 @@
- {
- struct _vte_xft_data *data;
- GdkPixmap *pixmap;
-+ gpointer screen;
-
- data = (struct _vte_xft_data*) draw->impl_data;
-
-+#if GTK_CHECK_VERSION(2,2,0)
-+ screen = gtk_widget_get_screen (draw->widget);
-+#else
-+ screen = NULL;
-+#endif
-+
- data->xpixmap = -1;
- data->pixmapw = data->pixmaph = 0;
-- pixmap = vte_bg_get_pixmap(vte_bg_get(), type,
-+ pixmap = vte_bg_get_pixmap(vte_bg_get_for_screen(screen), type,
- pixbuf, file, color, saturation,
- _vte_draw_get_colormap(draw, TRUE));
- if (GDK_IS_PIXMAP(data->pixmap)) {
---- src/vtebg.c.orig Wed Mar 9 06:24:56 2005
-+++ src/vtebg.c Sun Jul 10 20:25:15 2005
-@@ -37,7 +37,9 @@ struct VteBgPrivate {
- GList *cache;
- };
-
--static VteBg *singleton_bg = NULL;
-+#if !GTK_CHECK_VERSION(2,2,0)
-+static VteBg *singlehead_bg = NULL;
-+#endif
- static void vte_bg_set_root_pixmap(VteBg *bg, GdkPixmap *pixmap);
- static void vte_bg_init(VteBg *bg, gpointer *klass);
- static GdkPixbuf *_vte_bg_resize_pixbuf(GdkPixbuf *pixbuf,
-@@ -70,7 +72,9 @@ vte_bg_source_name(enum VteBgSourceType
- #include <gdk/gdkx.h>
-
- struct VteBgNative {
-+#if GTK_CHECK_VERSION(2,2,0)
- GdkDisplay *display;
-+#endif
- GdkWindow *window;
- XID native_window;
- GdkAtom atom;
-@@ -81,18 +85,19 @@ static struct VteBgNative *
- vte_bg_native_new(GdkWindow *window)
- {
- struct VteBgNative *pvt;
-- Atom atom;
-+
- pvt = g_malloc0(sizeof(struct VteBgNative));
- pvt->window = window;
- pvt->native_window = gdk_x11_drawable_get_xid(window);
-- pvt->atom = gdk_atom_intern("_XROOTPMAP_ID", FALSE);
-+
- #if GTK_CHECK_VERSION(2,2,0)
-- atom = gdk_x11_atom_to_xatom_for_display(gdk_drawable_get_display(window),
-- pvt->atom);
-+ pvt->display = gdk_drawable_get_display(GDK_DRAWABLE(window));
-+ pvt->native_atom = gdk_x11_get_xatom_by_name_for_display(pvt->display, "_XROOTPMAP_ID");
-+ pvt->atom = gdk_x11_xatom_to_atom_for_display(pvt->display, pvt->native_atom);
- #else
-- atom = gdk_x11_atom_to_xatom(pvt->atom);
-+ pvt->atom = gdk_atom_intern("_XROOTPMAP_ID", FALSE);
-+ pvt->native_atom = gdk_x11_atom_to_xatom(pvt->atom);
- #endif
-- pvt->native_atom = atom;
- return pvt;
- }
-
-@@ -100,7 +105,7 @@ static void
- _vte_bg_display_sync(VteBg *bg)
- {
- #if GTK_CHECK_VERSION(2,2,0)
-- gdk_display_sync(gdk_drawable_get_display(bg->native->window));
-+ gdk_display_sync(bg->native->display);
- #else
- XSync(GDK_DISPLAY(), FALSE);
- #endif
-@@ -112,7 +117,7 @@ _vte_property_get_pixmaps(GdkWindow *win
- XID **pixmaps)
- {
- return gdk_property_get(window, atom, GDK_TARGET_PIXMAP,
-- 0, INT_MAX,
-+ 0, INT_MAX - 3,
- FALSE,
- type, NULL, size,
- (guchar**) pixmaps);
-@@ -136,7 +141,7 @@ vte_bg_root_pixmap(VteBg *bg)
- (prop_size >= sizeof(XID) &&
- (pixmaps != NULL))) {
- #if GTK_CHECK_VERSION(2,2,0)
-- pixmap = gdk_pixmap_foreign_new_for_display(gdk_drawable_get_display(bg->native->window), pixmaps[0]);
-+ pixmap = gdk_pixmap_foreign_new_for_display(bg->native->display, pixmaps[0]);
- #else
- pixmap = gdk_pixmap_foreign_new(pixmaps[0]);
- #endif
-@@ -244,6 +249,7 @@ vte_bg_get_type(void)
-
- /**
- * vte_bg_get:
-+ * @screen : A #GdkScreen.
- *
- * Finds the address of the global #VteBg object, creating the object if
- * necessary.
-@@ -251,12 +257,48 @@ vte_bg_get_type(void)
- * Returns: the global #VteBg object
- */
- VteBg *
--vte_bg_get(void)
-+vte_bg_get_for_screen(gpointer screen)
- {
-- if (!VTE_IS_BG(singleton_bg)) {
-- singleton_bg = g_object_new(VTE_TYPE_BG, NULL);
-+ GdkEventMask events;
-+ GdkWindow *window;
-+ VteBg *bg;
-+
-+#if GTK_CHECK_VERSION(2,2,0)
-+ bg = g_object_get_data(G_OBJECT(screen), "vte-bg");
-+ if (G_UNLIKELY(bg == NULL)) {
-+ bg = g_object_new(VTE_TYPE_BG, NULL);
-+ g_object_set_data(G_OBJECT(screen), "vte-bg", bg);
-+
-+ /* connect bg to screen */
-+ bg->screen = screen;
-+ window = gdk_screen_get_root_window(screen);
-+ bg->native = vte_bg_native_new(window);
-+ bg->root_pixmap = vte_bg_root_pixmap(bg);
-+ bg->pvt = g_malloc0(sizeof(struct VteBgPrivate));
-+ bg->pvt->cache = NULL;
-+ events = gdk_window_get_events(window);
-+ events |= GDK_PROPERTY_CHANGE_MASK;
-+ gdk_window_set_events(window, events);
-+ gdk_window_add_filter(window, vte_bg_root_filter, bg);
- }
-- return singleton_bg;
-+#else
-+ if (G_UNLIKELY(singlehead_bg == NULL)) {
-+ bg = g_object_new(VTE_TYPE_BG, NULL);
-+ singlehead_bg = bg;
-+
-+ window = gdk_get_default_root_window();
-+ bg->native = vte_bg_native_new(window);
-+ bg->root_pixmap = vte_bg_root_pixmap(bg);
-+ bg->pvt = g_malloc0(sizeof(struct VteBgPrivate));
-+ bg->pvt->cache = NULL;
-+ events = gdk_window_get_events(window);
-+ events |= GDK_PROPERTY_CHANGE_MASK;
-+ gdk_window_set_events(window, events);
-+ gdk_window_add_filter(window, vte_bg_root_filter, bg);
-+ }
-+#endif
-+
-+ return bg;
- }
-
- struct VteBgCacheItem {
-@@ -274,17 +316,6 @@ struct VteBgCacheItem {
- static void
- vte_bg_init(VteBg *bg, gpointer *klass)
- {
-- GdkWindow *window;
-- GdkEventMask events;
-- window = gdk_get_default_root_window();
-- bg->native = vte_bg_native_new(window);
-- bg->root_pixmap = vte_bg_root_pixmap(bg);
-- bg->pvt = g_malloc0(sizeof(struct VteBgPrivate));
-- bg->pvt->cache = NULL;
-- events = gdk_window_get_events(window);
-- events |= GDK_PROPERTY_CHANGE_MASK;
-- gdk_window_set_events(window, events);
-- gdk_window_add_filter(window, vte_bg_root_filter, bg);
- }
-
- /* Generate lookup tables for desaturating an image toward a given color. The
-@@ -581,10 +612,6 @@ vte_bg_get_pixmap(VteBg *bg,
- GdkPixbuf *pixbuf;
- char *file;
-
-- if (bg == NULL) {
-- bg = vte_bg_get();
-- }
--
- if (source_type == VTE_BG_SOURCE_NONE) {
- return NULL;
- }
-@@ -614,7 +641,11 @@ vte_bg_get_pixmap(VteBg *bg,
- int width, height;
- /* Tell GTK+ that this foreign pixmap shares the
- * root window's colormap. */
-+#if GTK_CHECK_VERSION(2,2,0)
-+ rcolormap = gdk_drawable_get_colormap(gdk_screen_get_root_window(bg->screen));
-+#else
- rcolormap = gdk_drawable_get_colormap(gdk_get_default_root_window());
-+#endif
- if (gdk_drawable_get_colormap(bg->root_pixmap) == NULL) {
- gdk_drawable_set_colormap(bg->root_pixmap,
- rcolormap);
-@@ -710,10 +741,6 @@ vte_bg_get_pixbuf(VteBg *bg,
- GdkColormap *rcolormap;
- char *file;
-
-- if (bg == NULL) {
-- bg = vte_bg_get();
-- }
--
- if (source_type == VTE_BG_SOURCE_NONE) {
- return NULL;
- }
-@@ -743,7 +770,11 @@ vte_bg_get_pixbuf(VteBg *bg,
-
- /* If the pixmap doesn't have a colormap, tell GTK+ that
- * it shares the root window's colormap. */
-+#if GTK_CHECK_VERSION(2,2,0)
-+ rcolormap = gdk_drawable_get_colormap(gdk_screen_get_root_window(bg->screen));
-+#else
- rcolormap = gdk_drawable_get_colormap(gdk_get_default_root_window());
-+#endif
- if (gdk_drawable_get_colormap(bg->root_pixmap) == NULL) {
- gdk_drawable_set_colormap(bg->root_pixmap, rcolormap);
- }