[gnome-terminal/f20-gnome-3-12] Fix GNOME #730389 and make transparency robust against different themes

Debarshi Ray rishi at fedoraproject.org
Wed May 28 14:18:22 UTC 2014


commit e71db07dcca24d206a92709be6d670f846b8d0ca
Author: Debarshi Ray <debarshir at gnome.org>
Date:   Wed May 28 16:16:57 2014 +0200

    Fix GNOME #730389 and make transparency robust against different themes

 ...hange-the-title-on-tab-labels-that-no-lon.patch |   35 +++++++++
 gnome-terminal.spec                                |   12 +++-
 restore-transparency.patch                         |   74 ++++++++++++++++++--
 3 files changed, 113 insertions(+), 8 deletions(-)
---
diff --git a/0001-app-Don-t-change-the-title-on-tab-labels-that-no-lon.patch b/0001-app-Don-t-change-the-title-on-tab-labels-that-no-lon.patch
new file mode 100644
index 0000000..49c624e
--- /dev/null
+++ b/0001-app-Don-t-change-the-title-on-tab-labels-that-no-lon.patch
@@ -0,0 +1,35 @@
+From e2824de3fc3696dd14752501f15c484a3b398ff8 Mon Sep 17 00:00:00 2001
+From: Egmont Koblinger <egmont at gmail.com>
+Date: Wed, 28 May 2014 12:16:41 +0200
+Subject: [PATCH] app: Don't change the title on tab labels that no longer
+ exist
+
+This fixes a potential crash when a tab is moved to another window,
+and later the title of that terminal changes.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=730389
+(cherry picked from commit 6c1ece7dab2a11b7e0c6561f89cf83510abb51bf)
+---
+ src/terminal-tab-label.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/terminal-tab-label.c b/src/terminal-tab-label.c
+index 90bab28..eb2f81d 100644
+--- a/src/terminal-tab-label.c
++++ b/src/terminal-tab-label.c
+@@ -212,8 +212,11 @@ terminal_tab_label_constructor (GType type,
+ static void
+ terminal_tab_label_finalize (GObject *object)
+ {
+-//   TerminalTabLabel *tab_label = TERMINAL_TAB_LABEL (object);
++  TerminalTabLabel *tab_label = TERMINAL_TAB_LABEL (object);
+ 
++  g_signal_handlers_disconnect_by_func (tab_label->priv->screen,
++                                        G_CALLBACK (sync_tab_label),
++                                        tab_label->priv->label);
+   G_OBJECT_CLASS (terminal_tab_label_parent_class)->finalize (object);
+ }
+ 
+-- 
+1.9.3
+
diff --git a/gnome-terminal.spec b/gnome-terminal.spec
index 6a06737..0751288 100644
--- a/gnome-terminal.spec
+++ b/gnome-terminal.spec
@@ -8,14 +8,17 @@
 Summary: Terminal emulator for GNOME
 Name: gnome-terminal
 Version: 3.12.2
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv3+ and GFDL
 Group: User Interface/Desktops
 URL: http://www.gnome.org/
 #VCS: git:git://git.gnome.org/gnome-terminal
 Source0: http://download.gnome.org/sources/gnome-terminal/3.12/gnome-terminal-%{version}.tar.xz
 
-Patch0: restore-transparency.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=730389
+Patch0: 0001-app-Don-t-change-the-title-on-tab-labels-that-no-lon.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=730817
+Patch1: restore-transparency.patch
 
 BuildRequires: glib2-devel >= %{glib2_version}
 BuildRequires: GConf2-devel
@@ -52,6 +55,7 @@ option to the right-click context menu in Nautilus.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %configure --disable-static --with-gtk=3.0 --with-nautilus-extension
@@ -92,6 +96,10 @@ fi
 %{_libdir}/nautilus/extensions-3.0/libterminal-nautilus.so
 
 %changelog
+* Wed May 28 2014 Debarshi Ray <rishi at fedorapeople.org> - 3.12.2-3
+- Fix a crash when dragging the tabs (GNOME #730389)
+- Make transparent terminals robust across different themes
+
 * Wed May 14 2014 Debarshi Ray <rishi at fedorapeople.org> - 3.12.2-2
 - Restore transparency
 
diff --git a/restore-transparency.patch b/restore-transparency.patch
index cd2451b..b04985a 100644
--- a/restore-transparency.patch
+++ b/restore-transparency.patch
@@ -1,7 +1,7 @@
-From 0c654a989609557edc89a6fbce8fc474b51cea60 Mon Sep 17 00:00:00 2001
+From 125b960a77d41e79d3229e9eb125d030e29208c6 Mon Sep 17 00:00:00 2001
 From: Debarshi Ray <debarshir at gnome.org>
 Date: Mon, 12 May 2014 14:57:18 +0200
-Subject: [PATCH 1/2] Restore transparency
+Subject: [PATCH 1/3] Restore transparency
 
 The transparency settings were removed as a side effect of
 2bff4b63ed3ceef6055e35563e9b0b33ad57349d
@@ -257,13 +257,13 @@ index db06b3f..2adcba8 100644
    uuid_unparse (u, uuidstr);
    priv->uuid = g_strdup (uuidstr);
 -- 
-1.9.0
+1.9.3
 
 
-From c006eb3942fcad51a76ba26ad83bb261b51e62b1 Mon Sep 17 00:00:00 2001
+From 170455bce81e0c537cd110a6f0fbe22237f26de4 Mon Sep 17 00:00:00 2001
 From: Debarshi Ray <debarshir at gnome.org>
 Date: Thu, 15 May 2014 11:57:31 +0200
-Subject: [PATCH 2/2] schemas: Specify the range for
+Subject: [PATCH 2/3] schemas: Specify the range for
  background-transparency-percent
 
 ---
@@ -283,5 +283,67 @@ index ab7e914..53118ce 100644
        <description>A value between 0 and 100, where 0 is opaque and 100 is fully transparent.</description>
      </key>
 -- 
-1.9.0
+1.9.3
+
+
+From 8691cf7d1a0e4c8705de7c389a1a95df2e1d617a Mon Sep 17 00:00:00 2001
+From: Lars Uebernickel <lars.uebernickel at canonical.com>
+Date: Wed, 28 May 2014 14:11:02 +0200
+Subject: [PATCH 3/3] window: Make the drawing robust across all themes
+
+There are lots of themes out there in the wild that do not specify a
+background-color for all widgets and the default is transparent. This
+is usually not a problem because GTK+ sets an opaque region on the
+whole window and things without a background-color get drawn with the
+theme's default background colour. However, to achieve transparency
+we disable the opaque region by making the window app-paintable. This
+can lead to transparent menubars or notebook tabs in some themes. We
+can avoid this by ensuring that the window always renders a background.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=730016
+---
+ src/terminal-window.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/src/terminal-window.c b/src/terminal-window.c
+index 2adcba8..35de19a 100644
+--- a/src/terminal-window.c
++++ b/src/terminal-window.c
+@@ -2271,6 +2271,26 @@ terminal_window_realize (GtkWidget *widget)
+ }
+ 
+ static gboolean
++terminal_window_draw (GtkWidget *widget,
++                      cairo_t   *cr)
++{
++  if (gtk_widget_get_app_paintable (widget))
++    {
++      GtkStyleContext *context;
++      int width;
++      int height;
++
++      context = gtk_widget_get_style_context (widget);
++      width = gtk_widget_get_allocated_width (widget);
++      height = gtk_widget_get_allocated_height (widget);
++      gtk_render_background (context, cr, 0, 0, width, height);
++      gtk_render_frame (context, cr, 0, 0, width, height);
++    }
++
++  return GTK_WIDGET_CLASS (terminal_window_parent_class)->draw (widget, cr);
++}
++
++static gboolean
+ terminal_window_state_event (GtkWidget            *widget,
+                              GdkEventWindowState  *event)
+ {
+@@ -2806,6 +2826,7 @@ terminal_window_class_init (TerminalWindowClass *klass)
+ 
+   widget_class->show = terminal_window_show;
+   widget_class->realize = terminal_window_realize;
++  widget_class->draw = terminal_window_draw;
+   widget_class->window_state_event = terminal_window_state_event;
+   widget_class->screen_changed = terminal_window_screen_changed;
+   widget_class->style_updated = terminal_window_style_updated;
+-- 
+1.9.3
 


More information about the scm-commits mailing list