# HG changeset patch # User nenolod # Date 1152524077 25200 # Node ID 5767c05ce90008378d4eb311be45289499e706f0 # Parent 27d9eb18c7cf16583cc96760abc4e7599c75e575 [svn] - do transparency the X11 way diff -r 27d9eb18c7cf -r 5767c05ce900 ChangeLog --- a/ChangeLog Mon Jul 10 01:18:38 2006 -0700 +++ b/ChangeLog Mon Jul 10 02:34:37 2006 -0700 @@ -1,3 +1,15 @@ +2006-07-10 08:18:38 +0000 William Pitcock + revision [1670] + - some improvements to song_change, still sucky + - jackd volume saving stuff (via galiyosha) + + + Changes: Modified: + +4 -9 trunk/Plugins/General/song_change/song_change.c + +20 -2 trunk/Plugins/Output/jack/jack.c + +1 -0 trunk/Plugins/Output/jack/jack.h + + 2006-07-10 05:59:20 +0000 William Pitcock revision [1668] - properly respect signedness in get_spc_info_(). diff -r 27d9eb18c7cf -r 5767c05ce900 audacious/playlist_list.c --- a/audacious/playlist_list.c Mon Jul 10 01:18:38 2006 -0700 +++ b/audacious/playlist_list.c Mon Jul 10 02:34:37 2006 -0700 @@ -85,9 +85,9 @@ b = bm * (pixel & visual->blue_mask) + bgb; gdk_image_put_pixel (ximg, x, y, - ((r >> 8) & visual->red_mask) | - ((g >> 8) & visual->green_mask) | - ((b >> 8) & visual->blue_mask)); + ((r >> 8) & visual->red_mask) | + ((g >> 8) & visual->green_mask) | + ((b >> 8) & visual->blue_mask)); } } } @@ -120,31 +120,40 @@ #include #include -GdkPixmap *get_transparency_pixmap(void) +GdkDrawable *get_transparency_pixmap(void) { - Atom type; - static Atom prop = None; - int format; - unsigned long length, after; - unsigned char *data; - GdkPixmap *retval = NULL; + GdkDrawable *root; + XID *pixmaps; + GdkAtom prop_type; + gint prop_size; + GdkPixmap *pixmap; + gboolean ret; + + root = gdk_get_default_root_window(); + + pixmap = NULL; + pixmaps = NULL; + + gdk_error_trap_push(); - if(prop == None) - prop = XInternAtom(GDK_DISPLAY(), "_XROOTPMAP_ID", True); - if(prop == None) - return NULL; + ret = gdk_property_get(root, gdk_atom_intern("_XROOTPMAP_ID", TRUE), + 0, 0, INT_MAX - 3, + FALSE, + &prop_type, NULL, &prop_size, + (guchar **) &pixmaps); - XGetWindowProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), prop, 0L, 1L, False, AnyPropertyType, &type, &format, &length, &after, &data); + gdk_error_trap_pop(); - if (data) - { - if(type == XA_PIXMAP) - retval = gdk_pixmap_foreign_new(*((Pixmap *)data)); + if ((ret == TRUE) && (prop_type == GDK_TARGET_PIXMAP) && (prop_size >= sizeof(XID)) && (pixmaps != NULL)) + { + pixmap = gdk_pixmap_foreign_new_for_display(gdk_drawable_get_display(root), + pixmaps[0]); - XFree(data); - } + if (pixmaps != NULL) + g_free(pixmaps); + } - return retval; + return GDK_DRAWABLE(pixmap); } static GdkFilterReturn diff -r 27d9eb18c7cf -r 5767c05ce900 audacious/playlist_list.h --- a/audacious/playlist_list.h Mon Jul 10 01:18:38 2006 -0700 +++ b/audacious/playlist_list.h Mon Jul 10 02:34:37 2006 -0700 @@ -50,7 +50,7 @@ int playlist_list_get_playlist_position(PlayList_List * pl, gint x, gint y); void playlist_list_set_font(const gchar * font); GdkPixmap *rootpix; -GdkPixmap *shade_pixmap(GdkPixmap *in, gint x, gint y, gint x_offset, gint y_offset, gint w, gint h, GdkColor *shade_color); -GdkPixmap *get_transparency_pixmap(void); +GdkPixmap *shade_pixmap(GdkDrawable *in, gint x, gint y, gint x_offset, gint y_offset, gint w, gint h, GdkColor *shade_color); +GdkDrawable *get_transparency_pixmap(void); #endif