r29530 - in /desktop/unstable/gtk+3.0/debian: changelog patches/045_trayicon-visual.patch patches/series
biebl at users.alioth.debian.org
biebl at users.alioth.debian.org
Mon Aug 29 22:15:52 UTC 2011
Author: biebl
Date: Mon Aug 29 22:15:51 2011
New Revision: 29530
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=29530
Log:
debian/patches/045_trayicon-visual.patch: Fix assertion in trayicon-x11
when visual is not available. Thanks to Vincent Bernat for the patch.
Closes: #637067
Added:
desktop/unstable/gtk+3.0/debian/patches/045_trayicon-visual.patch
Modified:
desktop/unstable/gtk+3.0/debian/changelog
desktop/unstable/gtk+3.0/debian/patches/series
Modified: desktop/unstable/gtk+3.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/changelog?rev=29530&op=diff
==============================================================================
--- desktop/unstable/gtk+3.0/debian/changelog [utf-8] (original)
+++ desktop/unstable/gtk+3.0/debian/changelog [utf-8] Mon Aug 29 22:15:51 2011
@@ -1,8 +1,14 @@
gtk+3.0 (3.0.12-2) UNRELEASED; urgency=low
+ [ Josselin Mouette ]
* Tighten dependencies on libgtk-3-common. Closes: #636766.
- -- Josselin Mouette <joss at debian.org> Fri, 19 Aug 2011 09:30:24 +0200
+ [ Michael Biebl ]
+ * debian/patches/045_trayicon-visual.patch: Fix assertion in trayicon-x11
+ when visual is not available. Thanks to Vincent Bernat for the patch.
+ Closes: #637067
+
+ -- Michael Biebl <biebl at debian.org> Tue, 30 Aug 2011 00:12:20 +0200
gtk+3.0 (3.0.12-1) unstable; urgency=low
Added: desktop/unstable/gtk+3.0/debian/patches/045_trayicon-visual.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/patches/045_trayicon-visual.patch?rev=29530&op=file
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/045_trayicon-visual.patch (added)
+++ desktop/unstable/gtk+3.0/debian/patches/045_trayicon-visual.patch [utf-8] Mon Aug 29 22:15:51 2011
@@ -1,0 +1,85 @@
+From 2c9e21777a406692bcf8b929c7853f2c87803667 Mon Sep 17 00:00:00 2001
+From: Vincent Bernat <bernat at luffy.cx>
+Date: Sat, 27 Aug 2011 20:06:26 +0200
+Subject: [PATCH] trayicon-x11: Fix warnings when visual is not available.
+
+This fixes a regression introduced in commit
+b1a1685a33eca16979e63d79915395af0b36. gdk_visual_get_*_pixel_details()
+should not be called with a NULL visual.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=649588
+
+trayicon-x11: Refactor code a bit
+
+Should make it more obvious what the code actually does.
+
+GtkTrayIconX11: Some more refactoring
+
+I like my refactoring better...
+---
+ gtk/gtktrayicon-x11.c | 36 +++++++++++++++++++-----------------
+ 1 files changed, 19 insertions(+), 17 deletions(-)
+
+diff --git a/gtk/gtktrayicon-x11.c b/gtk/gtktrayicon-x11.c
+index 6535a65..b26d47d 100644
+--- a/gtk/gtktrayicon-x11.c
++++ b/gtk/gtktrayicon-x11.c
+@@ -474,10 +474,6 @@ gtk_tray_icon_get_visual_property (GtkTrayIcon *icon)
+ gulong nitems;
+ gulong bytes_after;
+ int error, result;
+- GdkVisual *visual;
+- gint red_prec;
+- gint green_prec;
+- gint blue_prec;
+
+ g_assert (icon->priv->manager_window != None);
+
+@@ -492,25 +488,31 @@ gtk_tray_icon_get_visual_property (GtkTrayIcon *icon)
+ &bytes_after, &(prop.prop_ch));
+ error = gdk_error_trap_pop ();
+
+- visual = NULL;
+-
+ if (!error && result == Success &&
+ type == XA_VISUALID && nitems == 1 && format == 32)
+ {
+- VisualID visual_id = prop.prop[0];
++ VisualID visual_id;
++ GdkVisual *visual;
++ gint red_prec, green_prec, blue_prec;
++
++ visual_id = prop.prop[0];
+ visual = gdk_x11_screen_lookup_visual (screen, visual_id);
++ 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);
++ icon->priv->manager_visual = visual;
++ icon->priv->manager_visual_rgba =
++ (red_prec + blue_prec + green_prec < gdk_visual_get_depth (visual));
++ }
++ else
++ {
++ icon->priv->manager_visual = NULL;
++ icon->priv->manager_visual_rgba = FALSE;
+ }
+
+- 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);
+-
+- icon->priv->manager_visual = visual;
+- icon->priv->manager_visual_rgba = visual != NULL &&
+- (red_prec + blue_prec + green_prec < gdk_visual_get_depth (visual));
+-
+- /* For the background-relative hack we use when we aren't using a real RGBA
+- * visual, we can't be double-buffered */
++ /* For the background-relative hack we use when we aren't
++ * using a real RGBA visual, we can't be double-buffered
++ */
+ gtk_widget_set_double_buffered (GTK_WIDGET (icon), icon->priv->manager_visual_rgba);
+
+ if (type != None)
+--
+1.7.5.4
+
Modified: desktop/unstable/gtk+3.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/patches/series?rev=29530&op=diff
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gtk+3.0/debian/patches/series [utf-8] Mon Aug 29 22:15:51 2011
@@ -7,4 +7,5 @@
042_treeview_single-focus.patch
043_notebook_scroll.patch
044_tracker_fts.patch
+045_trayicon-visual.patch
060_ignore-random-icons.patch
More information about the pkg-gnome-commits
mailing list