Replace deprecated GDK symbols

The fix depends on API introduced in this cycle, so the required
GTK+ version is bumped to 2.21.1.

https://bugzilla.gnome.org/show_bug.cgi?id=621845
This commit is contained in:
Florian Müllner 2010-06-26 21:47:26 +02:00 committed by Owen W. Taylor
parent 7b79e2e35c
commit a45021bd60
3 changed files with 8 additions and 3 deletions

View File

@ -61,7 +61,7 @@ CLUTTER_MIN_VERSION=1.2.8
GOBJECT_INTROSPECTION_MIN_VERSION=0.6.11 GOBJECT_INTROSPECTION_MIN_VERSION=0.6.11
GJS_MIN_VERSION=0.7 GJS_MIN_VERSION=0.7
MUTTER_MIN_VERSION=2.31.4 MUTTER_MIN_VERSION=2.31.4
GTK_MIN_VERSION=2.18.0 GTK_MIN_VERSION=2.21.1
GIO_MIN_VERSION=2.25.9 GIO_MIN_VERSION=2.25.9
# Collect more than 20 libraries for a prize! # Collect more than 20 libraries for a prize!

View File

@ -235,7 +235,7 @@ create_bg_pixmap (GdkColormap *colormap,
GdkVisual *visual = gdk_colormap_get_visual (colormap); GdkVisual *visual = gdk_colormap_get_visual (colormap);
GdkPixmap *pixmap = gdk_pixmap_new (gdk_screen_get_root_window (screen), GdkPixmap *pixmap = gdk_pixmap_new (gdk_screen_get_root_window (screen),
1, 1, 1, 1,
visual->depth); gdk_visual_get_depth (visual));
cairo_t *cr; cairo_t *cr;
gdk_drawable_set_colormap (pixmap, colormap); gdk_drawable_set_colormap (pixmap, colormap);

View File

@ -238,6 +238,7 @@ na_tray_child_new (GdkScreen *screen,
gboolean visual_has_alpha; gboolean visual_has_alpha;
GdkColormap *colormap; GdkColormap *colormap;
gboolean new_colormap; gboolean new_colormap;
int red_prec, green_prec, blue_prec, depth;
int result; int result;
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL); g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
@ -283,7 +284,11 @@ na_tray_child_new (GdkScreen *screen,
/* We have alpha if the visual has something other than red, green, /* We have alpha if the visual has something other than red, green,
* and blue */ * and blue */
visual_has_alpha = visual->red_prec + visual->blue_prec + visual->green_prec < visual->depth; gdk_visual_get_red_pixel_details (visual, NULL, NULL, &red_prec);
gdk_visual_get_green_pixel_details (visual, NULL, NULL, &green_prec);
gdk_visual_get_blue_pixel_details (visual, NULL, NULL, &blue_prec);
depth = gdk_visual_get_depth (visual);
visual_has_alpha = red_prec + blue_prec + green_prec < depth;
child->has_alpha = (visual_has_alpha && child->has_alpha = (visual_has_alpha &&
gdk_display_supports_composite (gdk_screen_get_display (screen))); gdk_display_supports_composite (gdk_screen_get_display (screen)));