repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: edf61f90adfb42b9b9acbb1f2ba2f16ec805d0ea: path_to: revision_to:
commit edf61f90adfb42b9b9acbb1f2ba2f16ec805d0ea Author: Sasha VaskoDate: Thu Jul 26 16:17:50 2007 +0000 fixed libAI usage for multi-display - requires new libAfterImage from CVS - version 1.15 diff --git a/src/init.C b/src/init.C
--- a/src/init.C +++ b/src/init.C @@ -319,9 +319,7 @@ rxvt_term::init_resources (int argc, const char *const *argv) #endif #ifdef HAVE_AFTERIMAGE - //TODO: why set it to 0 and then to dpy? - ::dpy = NULL; /* init global var from libAfter... */ - asv = AFTERIMAGE_DPY_OP (create_asvisual_for_id (dpy, display->screen, depth, XVisualIDFromVisual (visual), cmap, NULL)); + asv = create_asvisual_for_id (dpy, display->screen, depth, XVisualIDFromVisual (visual), cmap, NULL); #endif free (r_argv); diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -885,10 +885,6 @@ extern class rxvt_composite_vec rxvt_composite;
class keyboard_manager;
#endif
-/* to get libAfterImage to work with multiple displays we use that hack : */
-/* should not need that with libAfterImage version >= 1.15 */
-#define AFTERIMAGE_DPY_OP(op) ((::dpy = dpy), (op))
-
struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen {
// special markers with magic addresses
diff --git a/src/xpm.C b/src/xpm.C
--- a/src/xpm.C
+++ b/src/xpm.C
@@ -393,7 +393,7 @@ rxvt_term::resize_pixmap ()
ASImage *scaled_im = scale_asimage (asv, original_asim, w, h, ASA_XImage, 0, ASIMAGE_QUALITY_DEFAULT);
if (scaled_im)
{
- pixmap = AFTERIMAGE_DPY_OP (asimage2pixmap(asv, display->root, scaled_im, gc, True));
+ pixmap = asimage2pixmap(asv, display->root, scaled_im, gc, True);
destroy_asimage (&scaled_im);
}
}
@@ -493,7 +493,7 @@ rxvt_term::set_bgPixmap (const char *file)
}
if (original_asim)
{
- bgPixmap.pixmap = AFTERIMAGE_DPY_OP (asimage2pixmap (asv, display->root, original_asim, NULL, True));
+ bgPixmap.pixmap = asimage2pixmap (asv, display->root, original_asim, NULL, True);
xpmAttr.width = original_asim->width ;
xpmAttr.height = original_asim->height ;
}
@@ -865,7 +865,7 @@ rxvt_term::check_our_parents_cb (time_watcher &w)
ARGB32 tint ;
unsigned int pmap_w = 0, pmap_h = 0;
- if (get_drawable_size( rootpixmap, &pmap_w, &pmap_h ))
+ if (get_dpy_drawable_size( dpy, rootpixmap, &pmap_w, &pmap_h ))
{
int root_x = 0, root_y = 0;
@@ -882,7 +882,7 @@ rxvt_term::check_our_parents_cb (time_watcher &w)
shade.tintColor.red = shade.tintColor.green = shade.tintColor.blue = 0xFFFF;
tint = shading2tint32( &shade );
gc = XCreateGC (dpy, vt, 0UL, &gcvalue);
- if (GetWinPosition (parent[0], &root_x, &root_y) )
+ if (get_dpy_window_position(dpy, display->root, parent[0], NULL, NULL, &root_x, &root_y))
{
ASImageLayer *layers = create_image_layers( 2 );
ASImage *merged_im = NULL;
@@ -903,7 +903,7 @@ rxvt_term::check_our_parents_cb (time_watcher &w)
MAKE_ROOTPMAP_GEOM(x,w,width);
MAKE_ROOTPMAP_GEOM(y,h,height);
- layers[0].im = AFTERIMAGE_DPY_OP (pixmap2asimage (asv, rootpixmap, back_x, back_y, back_w, back_h, AllPlanes, ASA_ASImage, 100));
+ layers[0].im = pixmap2asimage (asv, rootpixmap, back_x, back_y, back_w, back_h, AllPlanes, ASA_ASImage, 100);
layers[0].clip_x = (back_w == pmap_w)?root_x:0;
layers[0].clip_y = (back_h == pmap_h)?root_y:0;
layers[0].clip_width = szHint.width;
@@ -961,7 +961,7 @@ rxvt_term::check_our_parents_cb (time_watcher &w)
destroy_asimage( &(layers[0].im) );
if (merged_im != NULL)
{
- tmp_pmap = AFTERIMAGE_DPY_OP (asimage2pixmap (asv, DefaultRootWindow(dpy), merged_im, gc, True));
+ tmp_pmap = asimage2pixmap (asv, DefaultRootWindow(dpy), merged_im, gc, True);
destroy_asimage( &merged_im );
}
free( layers );
-----END OF PAGE-----