summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalev Lember <kalevlember@gmail.com>2014-10-16 15:16:31 +0200
committerKalev Lember <kalevlember@gmail.com>2014-10-16 15:21:09 +0200
commite719f2e9bd9d70d0a782015e726ca65c3c9535cb (patch)
tree835b7e1815510eca2f8607e9b4601dd2e38edcae
parentUpdate to 3.14.3 (diff)
downloadgtk3-classic-build-gtk3-e719f2e9bd9d70d0a782015e726ca65c3c9535cb.tar.gz
gtk3-classic-build-gtk3-e719f2e9bd9d70d0a782015e726ca65c3c9535cb.tar.bz2
gtk3-classic-build-gtk3-e719f2e9bd9d70d0a782015e726ca65c3c9535cb.zip
Backport a patch to fix status icons in XFCE
https://bugzilla.redhat.com/show_bug.cgi?id=1134663
-rw-r--r--0001-Revert-gtktrayicon-x11-Stop-using-set_double_buffere.patch62
-rw-r--r--gtk3.spec9
2 files changed, 70 insertions, 1 deletions
diff --git a/0001-Revert-gtktrayicon-x11-Stop-using-set_double_buffere.patch b/0001-Revert-gtktrayicon-x11-Stop-using-set_double_buffere.patch
new file mode 100644
index 0000000..3541b3c
--- /dev/null
+++ b/0001-Revert-gtktrayicon-x11-Stop-using-set_double_buffere.patch
@@ -0,0 +1,62 @@
+From 36bc6c82f97d36efc3740f837e7e241ee1529559 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Wed, 15 Oct 2014 14:37:25 -0400
+Subject: [PATCH] Revert "gtktrayicon-x11: Stop using set_double_buffered"
+
+This reverts commit 4a72563c7b801052f4291a4757bd1011946677b9.
+
+It turns out that this commit broke statusicons under Xfce when
+not using a compositor.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=737986
+---
+ gtk/deprecated/gtktrayicon-x11.c | 26 ++++++++++++++++++++++++++
+ 1 file changed, 26 insertions(+)
+
+diff --git a/gtk/deprecated/gtktrayicon-x11.c b/gtk/deprecated/gtktrayicon-x11.c
+index 503d64b..371cd0e 100644
+--- a/gtk/deprecated/gtktrayicon-x11.c
++++ b/gtk/deprecated/gtktrayicon-x11.c
+@@ -355,6 +355,27 @@ gtk_tray_icon_draw (GtkWidget *widget,
+ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+ cairo_paint (cr);
+ }
++ else
++ {
++ GdkRectangle clip;
++
++ if (gdk_cairo_get_clip_rectangle (cr, &clip))
++ {
++ /* Clear to parent-relative pixmap
++ * We need to use direct X access here because GDK doesn't know about
++ * the parent realtive pixmap. */
++ cairo_surface_flush (target);
++
++ XClearArea (GDK_WINDOW_XDISPLAY (window),
++ GDK_WINDOW_XID (window),
++ clip.x, clip.y,
++ clip.width, clip.height,
++ False);
++ cairo_surface_mark_dirty_rectangle (target,
++ clip.x, clip.y,
++ clip.width, clip.height);
++ }
++ }
+
+ if (GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->draw)
+ retval = GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->draw (widget, cr);
+@@ -480,6 +501,11 @@ gtk_tray_icon_get_visual_property (GtkTrayIcon *icon)
+ icon->priv->manager_visual_rgba = FALSE;
+ }
+
++ /* 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)
+ XFree (prop.prop);
+ }
+--
+2.1.0
+
diff --git a/gtk3.spec b/gtk3.spec
index e36a9ed..b24b8e3 100644
--- a/gtk3.spec
+++ b/gtk3.spec
@@ -18,7 +18,7 @@
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk3
Version: 3.14.3
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@@ -26,6 +26,9 @@ URL: http://www.gtk.org
Source: http://download.gnome.org/sources/gtk+/3.14/gtk+-%{version}.tar.xz
+# Backported upstream patch to fix status icons in XFCE
+Patch0: 0001-Revert-gtktrayicon-x11-Stop-using-set_double_buffere.patch
+
BuildRequires: gnome-common autoconf automake intltool gettext
BuildRequires: atk-devel >= %{atk_version}
BuildRequires: at-spi2-atk-devel
@@ -143,6 +146,7 @@ the functionality of the installed %{name} package.
%prep
%setup -q -n gtk+-%{version}
+%patch0 -p1
%build
@@ -313,6 +317,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache
%{_datadir}/installed-tests
%changelog
+* Thu Oct 16 2014 Kalev Lember <kalevlember@gmail.com> - 3.14.3-2
+- Backport a patch to fix status icons in XFCE (#1134663)
+
* Mon Oct 13 2014 Kalev Lember <kalevlember@gmail.com> - 3.14.3-1
- Update to 3.14.3
bgstack15