Gentoo Archives: gentoo-commits

From: Alexandre Rostovtsev <tetromino@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-terms/gnome-terminal/files/, x11-terms/gnome-terminal/
Date: Tue, 28 Jun 2016 04:57:23
Message-Id: 1467089804.d5f44d5cbee76147bb07d4e4ea999e7cb0cc1291.tetromino@gentoo
1 commit: d5f44d5cbee76147bb07d4e4ea999e7cb0cc1291
2 Author: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 28 04:55:38 2016 +0000
4 Commit: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 28 04:56:44 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5f44d5c
7
8 x11-terms/gnome-terminal: bump to 3.20.2 for gnome-3.20
9
10 Support for dark themes has been restored upstream!
11
12 Edit → Preferences → General → Theme variant = Dark
13
14 Package-Manager: portage-2.3.0
15
16 x11-terms/gnome-terminal/Manifest | 1 +
17 .../files/gnome-terminal-3.20.2-transparency.patch | 463 +++++++++++++++++++++
18 .../gnome-terminal/gnome-terminal-3.20.2.ebuild | 77 ++++
19 3 files changed, 541 insertions(+)
20
21 diff --git a/x11-terms/gnome-terminal/Manifest b/x11-terms/gnome-terminal/Manifest
22 index 08aee67..02ccfcb 100644
23 --- a/x11-terms/gnome-terminal/Manifest
24 +++ b/x11-terms/gnome-terminal/Manifest
25 @@ -1,3 +1,4 @@
26 DIST gnome-terminal-3.16.2.tar.xz 1798620 SHA256 9df7bab7bfd15ca9a3c60612e425baaf5c8b32ba181619f740b7129a0768f4e0 SHA512 06327569de64ec9d1a045ea191edaabfe80e62dc55b5b8722d36e9d419f8d0cdfda29503f4aec68ae61798d77269ad902864eee8609369da31315368a9ab254f WHIRLPOOL 559833e2080c784080e001260a732fa480f187d17a8d1d069253175b9afd053d4fbd1d7a557442c467b915d31432e50bb4f0f9a94699fb3ed95810fb5f32b56e
27 DIST gnome-terminal-3.18.2.tar.xz 1836144 SHA256 5e35c0fa1395258bab83952cfabe4c1828b8655bcd761f8faed70b452bd89efa SHA512 9fb3e15d90990e1c066a71a34657845a3a3531dcda928f5a61477528df3bd65125fcf28dfd278535e844ebf57fae738451cb5e6f0118bb75bedb98e92624ad41 WHIRLPOOL b8bfc15e37d7bc959057d0beff227f4724f046d3777f4e9111fae469891e37dce8bb6c296191822f55458b06b62dd84ba213b6345ff189861b0ddeddf2b3d14f
28 DIST gnome-terminal-3.18.3.tar.xz 1845452 SHA256 14c2fce1c6a80a3fb0cc8666d7752228adcb60d199634ab69150de32e3c17d56 SHA512 3375038f69f3dbe2dee49c0835dd7ed8bd787e5a9ca59a905b737d6482d9a0ba27e4d98558b37bcb5561d143dfa8bed5613d4f9a46ae3a420e5a80803a88f756 WHIRLPOOL 04e0fdc12d18b14cfe41c50a43ca2a1d2107be2d23b17fc88189964e002b24ce812c0ec0a247c6eb8ade4bef89e537f475e7a318b26e4cbcb0f89a0fab4bdf52
29 +DIST gnome-terminal-3.20.2.tar.xz 1897148 SHA256 f5383060730f1de70af35e917f82d5b6a14d963ad9cfd6a0e705f90011645a23 SHA512 fe56d5a72580830232880b8e1752b5b268cf559ec9c031382b3631af4b9f2f1b7f661cc22df2643e0d50e66f8595a625e000f6068b16b8c5c9b6e9256a1db79a WHIRLPOOL 4909f016d75ff74705b6d3c92f1f7f3dbfad09ed6172895b1ca3eb455940c57c181a001907cccf78997e49509eb0dd90c7a640e2a3aeeff662ca1fee207f80d1
30
31 diff --git a/x11-terms/gnome-terminal/files/gnome-terminal-3.20.2-transparency.patch b/x11-terms/gnome-terminal/files/gnome-terminal-3.20.2-transparency.patch
32 new file mode 100644
33 index 0000000..0144c06
34 --- /dev/null
35 +++ b/x11-terms/gnome-terminal/files/gnome-terminal-3.20.2-transparency.patch
36 @@ -0,0 +1,463 @@
37 +From 9ef3a75e6dcc347c023cf9c927383596912a7f2c Mon Sep 17 00:00:00 2001
38 +From: Debarshi Ray <debarshir@×××××.org>
39 +Date: Mon, 12 May 2014 14:57:18 +0200
40 +Subject: [PATCH 1/6] Restore transparency
41 +
42 +The transparency settings were removed as a side effect of
43 +2bff4b63ed3ceef6055e35563e9b0b33ad57349d
44 +
45 +This restores them and you will need a compositing window manager to
46 +use it. The background image setting, also known as faux transparency,
47 +was not restored.
48 +
49 +The transparency checkbox lost its mnemonic accelerator because 't'
50 +is already taken and using any other letter would make it hard to
51 +restore the translations of the string.
52 +---
53 + src/org.gnome.Terminal.gschema.xml | 10 +++++
54 + src/profile-editor.c | 11 +++++
55 + src/profile-preferences.ui | 92 ++++++++++++++++++++++++++++++++++++++
56 + src/terminal-schemas.h | 3 ++
57 + src/terminal-screen.c | 22 ++++++++-
58 + src/terminal-window.c | 7 +++
59 + 6 files changed, 144 insertions(+), 1 deletion(-)
60 +
61 +diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
62 +index c031c8ace24a..7bdd156e36aa 100644
63 +--- a/src/org.gnome.Terminal.gschema.xml
64 ++++ b/src/org.gnome.Terminal.gschema.xml
65 +@@ -370,6 +370,16 @@
66 + <default>'narrow'</default>
67 + <summary>Whether ambiguous-width characters are narrow or wide when using UTF-8 encoding</summary>
68 + </key>
69 ++ <key name="use-transparent-background" type="b">
70 ++ <default>false</default>
71 ++ <summary>Whether to use a transparent background</summary>
72 ++ </key>
73 ++ <key name="background-transparency-percent" type="i">
74 ++ <default>50</default>
75 ++ <range min="0" max="100"/>
76 ++ <summary>Adjust the amount of transparency</summary>
77 ++ <description>A value between 0 and 100, where 0 is opaque and 100 is fully transparent.</description>
78 ++ </key>
79 + </schema>
80 +
81 + <!-- Keybinding settings -->
82 +diff --git a/src/profile-editor.c b/src/profile-editor.c
83 +index ff26df6a0e1b..b8c1c784d17e 100644
84 +--- a/src/profile-editor.c
85 ++++ b/src/profile-editor.c
86 +@@ -1218,7 +1218,18 @@ terminal_profile_edit (GSettings *profile,
87 + "active-id",
88 + G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
89 +
90 ++ g_settings_bind (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND,
91 ++ gtk_builder_get_object (builder, "use-transparent-background"),
92 ++ "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
93 ++ g_settings_bind (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND,
94 ++ gtk_builder_get_object (builder, "background-transparent-scale-box"),
95 ++ "sensitive", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_NO_SENSITIVITY);
96 ++ g_settings_bind (profile, TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT,
97 ++ gtk_builder_get_object (builder, "background-transparent-adjustment"),
98 ++ "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
99 ++
100 + /* Finished! */
101 ++
102 + terminal_util_bind_mnemonic_label_sensitivity (editor);
103 +
104 + terminal_util_dialog_focus_widget (editor, widget_name);
105 +diff --git a/src/profile-preferences.ui b/src/profile-preferences.ui
106 +index 9c0094687ffd..9caf72da0f14 100644
107 +--- a/src/profile-preferences.ui
108 ++++ b/src/profile-preferences.ui
109 +@@ -23,6 +23,11 @@
110 + <property name="step_increment">1</property>
111 + <property name="page_increment">100</property>
112 + </object>
113 ++ <object class="GtkAdjustment" id="background-transparent-adjustment">
114 ++ <property name="upper">100</property>
115 ++ <property name="step_increment">1</property>
116 ++ <property name="page_increment">10</property>
117 ++ </object>
118 + <object class="GtkListStore" id="cjk-ambiguous-width-model">
119 + <columns>
120 + <!-- column-name gchararray -->
121 +@@ -1035,6 +1040,93 @@
122 + <property name="position">1</property>
123 + </packing>
124 + </child>
125 ++ <child>
126 ++ <object class="GtkBox" id="use-transparent-background-box">
127 ++ <property name="visible">True</property>
128 ++ <property name="can_focus">False</property>
129 ++ <property name="orientation">horizontal</property>
130 ++ <property name="spacing">12</property>
131 ++ <child>
132 ++ <object class="GtkCheckButton" id="use-transparent-background">
133 ++ <property name="label" translatable="yes">Transparent background</property>
134 ++ <property name="visible">True</property>
135 ++ <property name="can_focus">True</property>
136 ++ <property name="receives_default">False</property>
137 ++ <property name="use_underline">True</property>
138 ++ <property name="xalign">0</property>
139 ++ <property name="draw_indicator">True</property>
140 ++ </object>
141 ++ <packing>
142 ++ <property name="expand">False</property>
143 ++ <property name="fill">False</property>
144 ++ <property name="position">0</property>
145 ++ </packing>
146 ++ </child>
147 ++ <child>
148 ++ <object class="GtkBox" id="background-transparent-scale-box">
149 ++ <property name="visible">True</property>
150 ++ <property name="can_focus">False</property>
151 ++ <property name="orientation">horizontal</property>
152 ++ <property name="spacing">6</property>
153 ++ <child>
154 ++ <object class="GtkLabel" id="background-transparent-min-label">
155 ++ <property name="visible">True</property>
156 ++ <property name="can_focus">False</property>
157 ++ <property name="xalign">0.5</property>
158 ++ <property name="label" translatable="yes">none</property>
159 ++ <style>
160 ++ <class name="dim-label"/>
161 ++ </style>
162 ++ </object>
163 ++ <packing>
164 ++ <property name="expand">False</property>
165 ++ <property name="fill">False</property>
166 ++ <property name="position">0</property>
167 ++ </packing>
168 ++ </child>
169 ++ <child>
170 ++ <object class="GtkScale" id="background-transparent-scale">
171 ++ <property name="visible">True</property>
172 ++ <property name="can_focus">True</property>
173 ++ <property name="adjustment">background-transparent-adjustment</property>
174 ++ <property name="draw_value">False</property>
175 ++ </object>
176 ++ <packing>
177 ++ <property name="expand">True</property>
178 ++ <property name="fill">True</property>
179 ++ <property name="position">1</property>
180 ++ </packing>
181 ++ </child>
182 ++ <child>
183 ++ <object class="GtkLabel" id="background-transparent-max-label">
184 ++ <property name="visible">True</property>
185 ++ <property name="can_focus">False</property>
186 ++ <property name="xalign">0.5</property>
187 ++ <property name="label" translatable="yes">full</property>
188 ++ <style>
189 ++ <class name="dim-label"/>
190 ++ </style>
191 ++ </object>
192 ++ <packing>
193 ++ <property name="expand">False</property>
194 ++ <property name="fill">False</property>
195 ++ <property name="position">2</property>
196 ++ </packing>
197 ++ </child>
198 ++ </object>
199 ++ <packing>
200 ++ <property name="expand">True</property>
201 ++ <property name="fill">True</property>
202 ++ <property name="position">1</property>
203 ++ </packing>
204 ++ </child>
205 ++ </object>
206 ++ <packing>
207 ++ <property name="expand">True</property>
208 ++ <property name="fill">True</property>
209 ++ <property name="position">2</property>
210 ++ </packing>
211 ++ </child>
212 + </object>
213 + </child>
214 + </object>
215 +diff --git a/src/terminal-schemas.h b/src/terminal-schemas.h
216 +index 4b734a3961d1..e434075d86af 100644
217 +--- a/src/terminal-schemas.h
218 ++++ b/src/terminal-schemas.h
219 +@@ -69,6 +69,9 @@ G_BEGIN_DECLS
220 + #define TERMINAL_PROFILE_VISIBLE_NAME_KEY "visible-name"
221 + #define TERMINAL_PROFILE_WORD_CHAR_EXCEPTIONS_KEY "word-char-exceptions"
222 +
223 ++#define TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND "use-transparent-background"
224 ++#define TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT "background-transparency-percent"
225 ++
226 + #define TERMINAL_SETTING_CONFIRM_CLOSE_KEY "confirm-close"
227 + #define TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR_KEY "default-show-menubar"
228 + #define TERMINAL_SETTING_ENABLE_MENU_BAR_ACCEL_KEY "menu-accelerator-enabled"
229 +diff --git a/src/terminal-screen.c b/src/terminal-screen.c
230 +index 33a34abc2f93..92e8bb387d03 100644
231 +--- a/src/terminal-screen.c
232 ++++ b/src/terminal-screen.c
233 +@@ -855,7 +855,9 @@ terminal_screen_profile_changed_cb (GSettings *profile,
234 + prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_COLORS_SET_KEY) ||
235 + prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_BACKGROUND_COLOR_KEY) ||
236 + prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_FOREGROUND_COLOR_KEY) ||
237 +- prop_name == I_(TERMINAL_PROFILE_PALETTE_KEY))
238 ++ prop_name == I_(TERMINAL_PROFILE_PALETTE_KEY) ||
239 ++ prop_name == I_(TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND) ||
240 ++ prop_name == I_(TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT))
241 + update_color_scheme (screen);
242 +
243 + if (!prop_name || prop_name == I_(TERMINAL_PROFILE_AUDIBLE_BELL_KEY))
244 +@@ -925,6 +927,8 @@ update_color_scheme (TerminalScreen *screen)
245 + GdkRGBA *cursor_bgp = NULL, *cursor_fgp = NULL;
246 + GdkRGBA *highlight_bgp = NULL, *highlight_fgp = NULL;
247 + GtkStyleContext *context;
248 ++ GtkWidget *toplevel;
249 ++ gboolean transparent;
250 + gboolean use_theme_colors;
251 +
252 + context = gtk_widget_get_style_context (widget);
253 +@@ -966,6 +970,18 @@ update_color_scheme (TerminalScreen *screen)
254 + }
255 +
256 + colors = terminal_g_settings_get_rgba_palette (priv->profile, TERMINAL_PROFILE_PALETTE_KEY, &n_colors);
257 ++
258 ++ transparent = g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND);
259 ++ if (transparent)
260 ++ {
261 ++ gint transparency_percent;
262 ++
263 ++ transparency_percent = g_settings_get_int (profile, TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT);
264 ++ bg.alpha = (100 - transparency_percent) / 100.0;
265 ++ }
266 ++ else
267 ++ bg.alpha = 1.0;
268 ++
269 + vte_terminal_set_colors (VTE_TERMINAL (screen), &fg, &bg,
270 + colors, n_colors);
271 + vte_terminal_set_color_bold (VTE_TERMINAL (screen), boldp);
272 +@@ -973,6 +989,10 @@ update_color_scheme (TerminalScreen *screen)
273 + vte_terminal_set_color_cursor_foreground (VTE_TERMINAL (screen), cursor_fgp);
274 + vte_terminal_set_color_highlight (VTE_TERMINAL (screen), highlight_bgp);
275 + vte_terminal_set_color_highlight_foreground (VTE_TERMINAL (screen), highlight_fgp);
276 ++
277 ++ toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
278 ++ if (toplevel != NULL && gtk_widget_is_toplevel (toplevel))
279 ++ gtk_widget_set_app_paintable (toplevel, transparent);
280 + }
281 +
282 + static void
283 +diff --git a/src/terminal-window.c b/src/terminal-window.c
284 +index 80e54b002819..0642ccecda30 100644
285 +--- a/src/terminal-window.c
286 ++++ b/src/terminal-window.c
287 +@@ -2618,6 +2618,8 @@ terminal_window_init (TerminalWindow *window)
288 + TerminalWindowPrivate *priv;
289 + TerminalApp *app;
290 + TerminalSettingsList *profiles_list;
291 ++ GdkScreen *screen;
292 ++ GdkVisual *visual;
293 + GtkActionGroup *action_group;
294 + GtkAction *action;
295 + GtkUIManager *manager;
296 +@@ -2632,6 +2634,11 @@ terminal_window_init (TerminalWindow *window)
297 +
298 + gtk_widget_init_template (GTK_WIDGET (window));
299 +
300 ++ screen = gtk_widget_get_screen (GTK_WIDGET (window));
301 ++ visual = gdk_screen_get_rgba_visual (screen);
302 ++ if (visual != NULL)
303 ++ gtk_widget_set_visual (GTK_WIDGET (window), visual);
304 ++
305 + uuid_generate (u);
306 + uuid_unparse (u, uuidstr);
307 + priv->uuid = g_strdup (uuidstr);
308 +--
309 +2.5.0
310 +
311 +
312 +From 0bdf26225511bac8d00c08477dee431f04763330 Mon Sep 17 00:00:00 2001
313 +From: Lars Uebernickel <lars.uebernickel@×××××××××.com>
314 +Date: Wed, 28 May 2014 14:11:02 +0200
315 +Subject: [PATCH 2/6] window: Make the drawing robust across all themes
316 +
317 +There are lots of themes out there in the wild that do not specify a
318 +background-color for all widgets and the default is transparent. This
319 +is usually not a problem because GTK+ sets an opaque region on the
320 +whole window and things without a background-color get drawn with the
321 +theme's default background colour. However, to achieve transparency
322 +we disable the opaque region by making the window app-paintable. This
323 +can lead to transparent menubars or notebook tabs in some themes. We
324 +can avoid this by ensuring that the window always renders a background.
325 +
326 +https://bugzilla.gnome.org/show_bug.cgi?id=730016
327 +---
328 + src/terminal-window.c | 21 +++++++++++++++++++++
329 + 1 file changed, 21 insertions(+)
330 +
331 +diff --git a/src/terminal-window.c b/src/terminal-window.c
332 +index 0642ccecda30..1616689b3765 100644
333 +--- a/src/terminal-window.c
334 ++++ b/src/terminal-window.c
335 +@@ -2290,6 +2290,26 @@ terminal_window_realize (GtkWidget *widget)
336 + }
337 +
338 + static gboolean
339 ++terminal_window_draw (GtkWidget *widget,
340 ++ cairo_t *cr)
341 ++{
342 ++ if (gtk_widget_get_app_paintable (widget))
343 ++ {
344 ++ GtkStyleContext *context;
345 ++ int width;
346 ++ int height;
347 ++
348 ++ context = gtk_widget_get_style_context (widget);
349 ++ width = gtk_widget_get_allocated_width (widget);
350 ++ height = gtk_widget_get_allocated_height (widget);
351 ++ gtk_render_background (context, cr, 0, 0, width, height);
352 ++ gtk_render_frame (context, cr, 0, 0, width, height);
353 ++ }
354 ++
355 ++ return GTK_WIDGET_CLASS (terminal_window_parent_class)->draw (widget, cr);
356 ++}
357 ++
358 ++static gboolean
359 + terminal_window_state_event (GtkWidget *widget,
360 + GdkEventWindowState *event)
361 + {
362 +@@ -2818,6 +2838,7 @@ terminal_window_class_init (TerminalWindowClass *klass)
363 +
364 + widget_class->show = terminal_window_show;
365 + widget_class->realize = terminal_window_realize;
366 ++ widget_class->draw = terminal_window_draw;
367 + widget_class->window_state_event = terminal_window_state_event;
368 + widget_class->screen_changed = terminal_window_screen_changed;
369 + widget_class->style_updated = terminal_window_style_updated;
370 +--
371 +2.5.0
372 +
373 +
374 +From 8ecbda047d7c15bd6b387e9b7128e688708303e7 Mon Sep 17 00:00:00 2001
375 +From: "Owen W. Taylor" <otaylor@××××××××.net>
376 +Date: Fri, 13 Nov 2015 15:16:42 +0100
377 +Subject: [PATCH 3/6] screen, window: Extra padding around transparent
378 + terminals in Wayland
379 +
380 +https://bugzilla.redhat.com/show_bug.cgi?id=1207943
381 +---
382 + src/terminal-screen.c | 40 +++++++++++++++++++++++++++++++++++++---
383 + src/terminal-window.c | 18 ++++++++++++------
384 + 2 files changed, 49 insertions(+), 9 deletions(-)
385 +
386 +diff --git a/src/terminal-screen.c b/src/terminal-screen.c
387 +index 92e8bb387d03..1718d42edaa8 100644
388 +--- a/src/terminal-screen.c
389 ++++ b/src/terminal-screen.c
390 +@@ -140,6 +140,8 @@ static void terminal_screen_system_font_changed_cb (GSettings *,
391 + static gboolean terminal_screen_popup_menu (GtkWidget *widget);
392 + static gboolean terminal_screen_button_press (GtkWidget *widget,
393 + GdkEventButton *event);
394 ++static void terminal_screen_hierarchy_changed (GtkWidget *widget,
395 ++ GtkWidget *previous_toplevel);
396 + static gboolean terminal_screen_do_exec (TerminalScreen *screen,
397 + FDSetupData *data,
398 + GError **error);
399 +@@ -510,6 +512,7 @@ terminal_screen_class_init (TerminalScreenClass *klass)
400 + widget_class->drag_data_received = terminal_screen_drag_data_received;
401 + widget_class->button_press_event = terminal_screen_button_press;
402 + widget_class->popup_menu = terminal_screen_popup_menu;
403 ++ widget_class->hierarchy_changed = terminal_screen_hierarchy_changed;
404 +
405 + terminal_class->child_exited = terminal_screen_child_exited;
406 +
407 +@@ -913,6 +916,32 @@ terminal_screen_profile_changed_cb (GSettings *profile,
408 + }
409 +
410 + static void
411 ++update_toplevel_transparency (TerminalScreen *screen)
412 ++{
413 ++ GtkWidget *widget = GTK_WIDGET (screen);
414 ++ TerminalScreenPrivate *priv = screen->priv;
415 ++ GSettings *profile = priv->profile;
416 ++ GtkWidget *toplevel;
417 ++
418 ++ toplevel = gtk_widget_get_toplevel (widget);
419 ++ if (toplevel != NULL && gtk_widget_is_toplevel (toplevel))
420 ++ {
421 ++ gboolean transparent;
422 ++
423 ++ transparent = g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND);
424 ++ if (gtk_widget_get_app_paintable (toplevel) != transparent)
425 ++ {
426 ++ gtk_widget_set_app_paintable (toplevel, transparent);
427 ++
428 ++ /* The opaque region of the toplevel isn't updated until the toplevel is allocated;
429 ++ * set_app_paintable() doesn't force an allocation, so do that manually.
430 ++ */
431 ++ gtk_widget_queue_resize (toplevel);
432 ++ }
433 ++ }
434 ++}
435 ++
436 ++static void
437 + update_color_scheme (TerminalScreen *screen)
438 + {
439 + GtkWidget *widget = GTK_WIDGET (screen);
440 +@@ -990,9 +1019,7 @@ update_color_scheme (TerminalScreen *screen)
441 + vte_terminal_set_color_highlight (VTE_TERMINAL (screen), highlight_bgp);
442 + vte_terminal_set_color_highlight_foreground (VTE_TERMINAL (screen), highlight_fgp);
443 +
444 +- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
445 +- if (toplevel != NULL && gtk_widget_is_toplevel (toplevel))
446 +- gtk_widget_set_app_paintable (toplevel, transparent);
447 ++ update_toplevel_transparency (screen);
448 + }
449 +
450 + static void
451 +@@ -1595,6 +1622,13 @@ terminal_screen_do_popup (TerminalScreen *screen,
452 + terminal_screen_popup_info_unref (info);
453 + }
454 +
455 ++static void
456 ++terminal_screen_hierarchy_changed (GtkWidget *widget,
457 ++ GtkWidget *previous_toplevel)
458 ++{
459 ++ update_toplevel_transparency (TERMINAL_SCREEN (widget));
460 ++}
461 ++
462 + static gboolean
463 + terminal_screen_button_press (GtkWidget *widget,
464 + GdkEventButton *event)
465 +diff --git a/src/terminal-window.c b/src/terminal-window.c
466 +index 1616689b3765..353647903af0 100644
467 +--- a/src/terminal-window.c
468 ++++ b/src/terminal-window.c
469 +@@ -2295,15 +2295,21 @@ terminal_window_draw (GtkWidget *widget,
470 + {
471 + if (gtk_widget_get_app_paintable (widget))
472 + {
473 ++ GtkAllocation child_allocation;
474 + GtkStyleContext *context;
475 +- int width;
476 +- int height;
477 ++ GtkWidget *child;
478 ++
479 ++ /* Get the *child* allocation, so we don't overwrite window borders */
480 ++ child = gtk_bin_get_child (GTK_BIN (widget));
481 ++ gtk_widget_get_allocation (child, &child_allocation);
482 +
483 + context = gtk_widget_get_style_context (widget);
484 +- width = gtk_widget_get_allocated_width (widget);
485 +- height = gtk_widget_get_allocated_height (widget);
486 +- gtk_render_background (context, cr, 0, 0, width, height);
487 +- gtk_render_frame (context, cr, 0, 0, width, height);
488 ++ gtk_render_background (context, cr,
489 ++ child_allocation.x, child_allocation.y,
490 ++ child_allocation.width, child_allocation.height);
491 ++ gtk_render_frame (context, cr,
492 ++ child_allocation.x, child_allocation.y,
493 ++ child_allocation.width, child_allocation.height);
494 + }
495 +
496 + return GTK_WIDGET_CLASS (terminal_window_parent_class)->draw (widget, cr);
497 +--
498 +2.5.0
499 +
500
501 diff --git a/x11-terms/gnome-terminal/gnome-terminal-3.20.2.ebuild b/x11-terms/gnome-terminal/gnome-terminal-3.20.2.ebuild
502 new file mode 100644
503 index 0000000..8318e2b
504 --- /dev/null
505 +++ b/x11-terms/gnome-terminal/gnome-terminal-3.20.2.ebuild
506 @@ -0,0 +1,77 @@
507 +# Copyright 1999-2016 Gentoo Foundation
508 +# Distributed under the terms of the GNU General Public License v2
509 +# $Id$
510 +
511 +EAPI="6"
512 +GNOME2_LA_PUNT="yes"
513 +
514 +inherit autotools eutils gnome2 readme.gentoo-r1
515 +
516 +DESCRIPTION="The Gnome Terminal"
517 +HOMEPAGE="https://wiki.gnome.org/Apps/Terminal/"
518 +
519 +LICENSE="GPL-3+"
520 +SLOT="0"
521 +IUSE="debug +gnome-shell +nautilus vanilla"
522 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux"
523 +
524 +# FIXME: automagic dependency on gtk+[X]
525 +RDEPEND="
526 + >=dev-libs/glib-2.42:2[dbus]
527 + >=x11-libs/gtk+-3.12:3[X]
528 + >=x11-libs/vte-0.44.2:2.91
529 + >=gnome-base/dconf-0.14
530 + >=gnome-base/gsettings-desktop-schemas-0.1.0
531 + sys-apps/util-linux
532 + x11-libs/libSM
533 + x11-libs/libICE
534 + gnome-shell? ( gnome-base/gnome-shell )
535 + nautilus? ( >=gnome-base/nautilus-3 )
536 +"
537 +# itstool required for help/* with non-en LINGUAS, see bug #549358
538 +# xmllint required for glib-compile-resources, see bug #549304
539 +DEPEND="${RDEPEND}
540 + app-text/yelp-tools
541 + dev-libs/libxml2
542 + dev-util/desktop-file-utils
543 + dev-util/gdbus-codegen
544 + dev-util/itstool
545 + >=dev-util/intltool-0.50
546 + sys-devel/gettext
547 + virtual/pkgconfig
548 +"
549 +
550 +DOC_CONTENTS="To get previous working directory inherited in new opened
551 + tab you will need to add the following line to your ~/.bashrc:\n
552 + . /etc/profile.d/vte.sh"
553 +
554 +src_prepare() {
555 + if ! use vanilla; then
556 + # OpenSuSE patches, https://bugzilla.gnome.org/show_bug.cgi?id=695371
557 + # http://pkgs.fedoraproject.org/cgit/rpms/gnome-terminal.git/tree/gnome-terminal-transparency-notify.patch (first 3 parts)
558 + eapply "${FILESDIR}"/${PN}-3.20.2-transparency.patch
559 + eautoreconf
560 + fi
561 + gnome2_src_prepare
562 +}
563 +
564 +src_configure() {
565 + gnome2_src_configure \
566 + --disable-static \
567 + --disable-migration \
568 + $(use_enable debug) \
569 + $(use_enable gnome-shell search-provider) \
570 + $(use_with nautilus nautilus-extension) \
571 + VALAC=$(type -P true)
572 +}
573 +
574 +src_install() {
575 + DOCS="AUTHORS ChangeLog HACKING NEWS"
576 + gnome2_src_install
577 + readme.gentoo_create_doc
578 +}
579 +
580 +pkg_postinst() {
581 + gnome2_pkg_postinst
582 + readme.gentoo_print_elog
583 +}