Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-terms/gnome-terminal/, x11-terms/gnome-terminal/files/
Date: Mon, 11 Dec 2017 20:44:51
Message-Id: 1513025074.7692068bede4749a655c897692b4573e5f85c01b.mgorny@gentoo
1 commit: 7692068bede4749a655c897692b4573e5f85c01b
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 11 20:42:33 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 11 20:44:34 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7692068b
7
8 x11-terms/gnome-terminal: [QA] Move big patch to a distfile
9
10 Closes: https://bugs.gentoo.org/620648
11
12 x11-terms/gnome-terminal/Manifest | 1 +
13 .../files/gnome-terminal-3.22.0-transparency.patch | 463 ---------------------
14 .../gnome-terminal/gnome-terminal-3.22.2.ebuild | 4 +-
15 3 files changed, 4 insertions(+), 464 deletions(-)
16
17 diff --git a/x11-terms/gnome-terminal/Manifest b/x11-terms/gnome-terminal/Manifest
18 index 23f6320ab04..3dd9aa88041 100644
19 --- a/x11-terms/gnome-terminal/Manifest
20 +++ b/x11-terms/gnome-terminal/Manifest
21 @@ -1,3 +1,4 @@
22 +DIST gnome-terminal-3.22.0-transparency.patch.xz 4588 BLAKE2B 7cce4166fa2a47cd4cf55e2ee64790f7ed94d4c75b326dca15d49aef0f3a81e9c6200cd84d46b1a251376b4a108e3b94bcb53b3908b9a34306df6467a34c0760 SHA512 f30a25902842345f8c1b81cbe6ea9da25f428ce8867c4e021369b25a17e8135a944fa6ef4b4cba329edc5ad8af8e53c3ca4d61d172085edde80a9ee215323990
23 DIST gnome-terminal-3.22.2.tar.xz 1952372 BLAKE2B eddaa5b3900211a2823c86353c68b96aa2a5c3f4ccd51c553ab0a5c328b4dc6e922944ea62bfab7a1dd131464196e2a88c3cd365591b5deafc722b826ce18671 SHA512 3fa550c49c35d53c220d1f7a3f3d49d5130e3dd4af657e05627782abb84a449c6632a9919f5a97c78a5b9d92137e8d4bd68d8b880cd86203f866b85b9cda3db3
24 DIST gnome-terminal-3.24.2.tar.xz 1960952 BLAKE2B c94303cd8b322a37c70487fbab0f6ecd27b8e831cf44cdc80c82b31d2758f7c6927704d31c229cbbe41be565748238bbfcfae72470f273f7f3a9378c218af8b5 SHA512 08cd7b1b08cf22618554b1a051dcfee4a967165bfe93b77a6bc8b0c935695101e773e8d53a482d71aadb9ba7be7ac991d82dbf53b7a6f74f1f5144e4158f8a93
25 DIST gnome-terminal-notify-open-title-transparency.patch.xz 37448 BLAKE2B 159bbcf6ca387af8ae2f05c23b48afcdf11351025420ecfd10d1b8a1dd9c2c8016d1c89c6fca20dde3bf8ffe3a6091232a989cfd520fa6761f65eec29b569d84 SHA512 9af0d56df105a5bdb81b2609794669557a7f442f71b240ee10a6411fab20ad74c14489dbb9a536e208515053ea17776b3a15afb3b949a75a66f8c2ab3dbbff96
26
27 diff --git a/x11-terms/gnome-terminal/files/gnome-terminal-3.22.0-transparency.patch b/x11-terms/gnome-terminal/files/gnome-terminal-3.22.0-transparency.patch
28 deleted file mode 100644
29 index 981fc6d1319..00000000000
30 --- a/x11-terms/gnome-terminal/files/gnome-terminal-3.22.0-transparency.patch
31 +++ /dev/null
32 @@ -1,463 +0,0 @@
33 -From 000785a2194012702c5245b0ac69b0003371bcdd Mon Sep 17 00:00:00 2001
34 -From: Debarshi Ray <debarshir@×××××.org>
35 -Date: Mon, 12 May 2014 14:57:18 +0200
36 -Subject: [PATCH 1/3] Restore transparency
37 -
38 -The transparency settings were removed as a side effect of
39 -2bff4b63ed3ceef6055e35563e9b0b33ad57349d
40 -
41 -This restores them and you will need a compositing window manager to
42 -use it. The background image setting, also known as faux transparency,
43 -was not restored.
44 -
45 -The transparency checkbox lost its mnemonic accelerator because 't'
46 -is already taken and using any other letter would make it hard to
47 -restore the translations of the string.
48 ----
49 - src/org.gnome.Terminal.gschema.xml | 10 +++++
50 - src/profile-editor.c | 11 +++++
51 - src/profile-preferences.ui | 92 ++++++++++++++++++++++++++++++++++++++
52 - src/terminal-schemas.h | 3 ++
53 - src/terminal-screen.c | 22 ++++++++-
54 - src/terminal-window.c | 7 +++
55 - 6 files changed, 144 insertions(+), 1 deletion(-)
56 -
57 -diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
58 -index c031c8a..7bdd156 100644
59 ---- a/src/org.gnome.Terminal.gschema.xml
60 -+++ b/src/org.gnome.Terminal.gschema.xml
61 -@@ -370,6 +370,16 @@
62 - <default>'narrow'</default>
63 - <summary>Whether ambiguous-width characters are narrow or wide when using UTF-8 encoding</summary>
64 - </key>
65 -+ <key name="use-transparent-background" type="b">
66 -+ <default>false</default>
67 -+ <summary>Whether to use a transparent background</summary>
68 -+ </key>
69 -+ <key name="background-transparency-percent" type="i">
70 -+ <default>50</default>
71 -+ <range min="0" max="100"/>
72 -+ <summary>Adjust the amount of transparency</summary>
73 -+ <description>A value between 0 and 100, where 0 is opaque and 100 is fully transparent.</description>
74 -+ </key>
75 - </schema>
76 -
77 - <!-- Keybinding settings -->
78 -diff --git a/src/profile-editor.c b/src/profile-editor.c
79 -index 002561d..1a758a9 100644
80 ---- a/src/profile-editor.c
81 -+++ b/src/profile-editor.c
82 -@@ -1215,7 +1215,18 @@ terminal_profile_edit (GSettings *profile,
83 - "active-id",
84 - G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
85 -
86 -+ g_settings_bind (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND,
87 -+ gtk_builder_get_object (builder, "use-transparent-background"),
88 -+ "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
89 -+ g_settings_bind (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND,
90 -+ gtk_builder_get_object (builder, "background-transparent-scale-box"),
91 -+ "sensitive", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_NO_SENSITIVITY);
92 -+ g_settings_bind (profile, TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT,
93 -+ gtk_builder_get_object (builder, "background-transparent-adjustment"),
94 -+ "value", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
95 -+
96 - /* Finished! */
97 -+
98 - terminal_util_bind_mnemonic_label_sensitivity (editor);
99 -
100 - terminal_util_dialog_focus_widget (editor, widget_name);
101 -diff --git a/src/profile-preferences.ui b/src/profile-preferences.ui
102 -index 5adcb53..b7decb2 100644
103 ---- a/src/profile-preferences.ui
104 -+++ b/src/profile-preferences.ui
105 -@@ -23,6 +23,11 @@
106 - <property name="step_increment">1</property>
107 - <property name="page_increment">100</property>
108 - </object>
109 -+ <object class="GtkAdjustment" id="background-transparent-adjustment">
110 -+ <property name="upper">100</property>
111 -+ <property name="step_increment">1</property>
112 -+ <property name="page_increment">10</property>
113 -+ </object>
114 - <object class="GtkListStore" id="cjk-ambiguous-width-model">
115 - <columns>
116 - <!-- column-name gchararray -->
117 -@@ -1036,6 +1041,93 @@
118 - <property name="position">1</property>
119 - </packing>
120 - </child>
121 -+ <child>
122 -+ <object class="GtkBox" id="use-transparent-background-box">
123 -+ <property name="visible">True</property>
124 -+ <property name="can_focus">False</property>
125 -+ <property name="orientation">horizontal</property>
126 -+ <property name="spacing">12</property>
127 -+ <child>
128 -+ <object class="GtkCheckButton" id="use-transparent-background">
129 -+ <property name="label" translatable="yes">Transparent background</property>
130 -+ <property name="visible">True</property>
131 -+ <property name="can_focus">True</property>
132 -+ <property name="receives_default">False</property>
133 -+ <property name="use_underline">True</property>
134 -+ <property name="xalign">0</property>
135 -+ <property name="draw_indicator">True</property>
136 -+ </object>
137 -+ <packing>
138 -+ <property name="expand">False</property>
139 -+ <property name="fill">False</property>
140 -+ <property name="position">0</property>
141 -+ </packing>
142 -+ </child>
143 -+ <child>
144 -+ <object class="GtkBox" id="background-transparent-scale-box">
145 -+ <property name="visible">True</property>
146 -+ <property name="can_focus">False</property>
147 -+ <property name="orientation">horizontal</property>
148 -+ <property name="spacing">6</property>
149 -+ <child>
150 -+ <object class="GtkLabel" id="background-transparent-min-label">
151 -+ <property name="visible">True</property>
152 -+ <property name="can_focus">False</property>
153 -+ <property name="xalign">0.5</property>
154 -+ <property name="label" translatable="yes">none</property>
155 -+ <style>
156 -+ <class name="dim-label"/>
157 -+ </style>
158 -+ </object>
159 -+ <packing>
160 -+ <property name="expand">False</property>
161 -+ <property name="fill">False</property>
162 -+ <property name="position">0</property>
163 -+ </packing>
164 -+ </child>
165 -+ <child>
166 -+ <object class="GtkScale" id="background-transparent-scale">
167 -+ <property name="visible">True</property>
168 -+ <property name="can_focus">True</property>
169 -+ <property name="adjustment">background-transparent-adjustment</property>
170 -+ <property name="draw_value">False</property>
171 -+ </object>
172 -+ <packing>
173 -+ <property name="expand">True</property>
174 -+ <property name="fill">True</property>
175 -+ <property name="position">1</property>
176 -+ </packing>
177 -+ </child>
178 -+ <child>
179 -+ <object class="GtkLabel" id="background-transparent-max-label">
180 -+ <property name="visible">True</property>
181 -+ <property name="can_focus">False</property>
182 -+ <property name="xalign">0.5</property>
183 -+ <property name="label" translatable="yes">full</property>
184 -+ <style>
185 -+ <class name="dim-label"/>
186 -+ </style>
187 -+ </object>
188 -+ <packing>
189 -+ <property name="expand">False</property>
190 -+ <property name="fill">False</property>
191 -+ <property name="position">2</property>
192 -+ </packing>
193 -+ </child>
194 -+ </object>
195 -+ <packing>
196 -+ <property name="expand">True</property>
197 -+ <property name="fill">True</property>
198 -+ <property name="position">1</property>
199 -+ </packing>
200 -+ </child>
201 -+ </object>
202 -+ <packing>
203 -+ <property name="expand">True</property>
204 -+ <property name="fill">True</property>
205 -+ <property name="position">2</property>
206 -+ </packing>
207 -+ </child>
208 - </object>
209 - </child>
210 - </object>
211 -diff --git a/src/terminal-schemas.h b/src/terminal-schemas.h
212 -index 4b734a3..e434075 100644
213 ---- a/src/terminal-schemas.h
214 -+++ b/src/terminal-schemas.h
215 -@@ -69,6 +69,9 @@ G_BEGIN_DECLS
216 - #define TERMINAL_PROFILE_VISIBLE_NAME_KEY "visible-name"
217 - #define TERMINAL_PROFILE_WORD_CHAR_EXCEPTIONS_KEY "word-char-exceptions"
218 -
219 -+#define TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND "use-transparent-background"
220 -+#define TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT "background-transparency-percent"
221 -+
222 - #define TERMINAL_SETTING_CONFIRM_CLOSE_KEY "confirm-close"
223 - #define TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR_KEY "default-show-menubar"
224 - #define TERMINAL_SETTING_ENABLE_MENU_BAR_ACCEL_KEY "menu-accelerator-enabled"
225 -diff --git a/src/terminal-screen.c b/src/terminal-screen.c
226 -index 9a0b450..eab0cec 100644
227 ---- a/src/terminal-screen.c
228 -+++ b/src/terminal-screen.c
229 -@@ -827,7 +827,9 @@ terminal_screen_profile_changed_cb (GSettings *profile,
230 - prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_COLORS_SET_KEY) ||
231 - prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_BACKGROUND_COLOR_KEY) ||
232 - prop_name == I_(TERMINAL_PROFILE_HIGHLIGHT_FOREGROUND_COLOR_KEY) ||
233 -- prop_name == I_(TERMINAL_PROFILE_PALETTE_KEY))
234 -+ prop_name == I_(TERMINAL_PROFILE_PALETTE_KEY) ||
235 -+ prop_name == I_(TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND) ||
236 -+ prop_name == I_(TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT))
237 - update_color_scheme (screen);
238 -
239 - if (!prop_name || prop_name == I_(TERMINAL_PROFILE_AUDIBLE_BELL_KEY))
240 -@@ -897,6 +899,8 @@ update_color_scheme (TerminalScreen *screen)
241 - GdkRGBA *cursor_bgp = NULL, *cursor_fgp = NULL;
242 - GdkRGBA *highlight_bgp = NULL, *highlight_fgp = NULL;
243 - GtkStyleContext *context;
244 -+ GtkWidget *toplevel;
245 -+ gboolean transparent;
246 - gboolean use_theme_colors;
247 -
248 - context = gtk_widget_get_style_context (widget);
249 -@@ -938,6 +942,18 @@ update_color_scheme (TerminalScreen *screen)
250 - }
251 -
252 - colors = terminal_g_settings_get_rgba_palette (priv->profile, TERMINAL_PROFILE_PALETTE_KEY, &n_colors);
253 -+
254 -+ transparent = g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND);
255 -+ if (transparent)
256 -+ {
257 -+ gint transparency_percent;
258 -+
259 -+ transparency_percent = g_settings_get_int (profile, TERMINAL_PROFILE_BACKGROUND_TRANSPARENCY_PERCENT);
260 -+ bg.alpha = (100 - transparency_percent) / 100.0;
261 -+ }
262 -+ else
263 -+ bg.alpha = 1.0;
264 -+
265 - vte_terminal_set_colors (VTE_TERMINAL (screen), &fg, &bg,
266 - colors, n_colors);
267 - vte_terminal_set_color_bold (VTE_TERMINAL (screen), boldp);
268 -@@ -945,6 +961,10 @@ update_color_scheme (TerminalScreen *screen)
269 - vte_terminal_set_color_cursor_foreground (VTE_TERMINAL (screen), cursor_fgp);
270 - vte_terminal_set_color_highlight (VTE_TERMINAL (screen), highlight_bgp);
271 - vte_terminal_set_color_highlight_foreground (VTE_TERMINAL (screen), highlight_fgp);
272 -+
273 -+ toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
274 -+ if (toplevel != NULL && gtk_widget_is_toplevel (toplevel))
275 -+ gtk_widget_set_app_paintable (toplevel, transparent);
276 - }
277 -
278 - static void
279 -diff --git a/src/terminal-window.c b/src/terminal-window.c
280 -index a290d9f..020c6f0 100644
281 ---- a/src/terminal-window.c
282 -+++ b/src/terminal-window.c
283 -@@ -2621,6 +2621,8 @@ terminal_window_init (TerminalWindow *window)
284 - TerminalWindowPrivate *priv;
285 - TerminalApp *app;
286 - TerminalSettingsList *profiles_list;
287 -+ GdkScreen *screen;
288 -+ GdkVisual *visual;
289 - GSettings *gtk_debug_settings;
290 - GtkActionGroup *action_group;
291 - GtkAction *action;
292 -@@ -2637,6 +2639,11 @@ terminal_window_init (TerminalWindow *window)
293 -
294 - gtk_widget_init_template (GTK_WIDGET (window));
295 -
296 -+ screen = gtk_widget_get_screen (GTK_WIDGET (window));
297 -+ visual = gdk_screen_get_rgba_visual (screen);
298 -+ if (visual != NULL)
299 -+ gtk_widget_set_visual (GTK_WIDGET (window), visual);
300 -+
301 - uuid_generate (u);
302 - uuid_unparse (u, uuidstr);
303 - priv->uuid = g_strdup (uuidstr);
304 ---
305 -2.10.0
306 -
307 -
308 -From 9be09f1e055ae7aa2589ec94add5e994260929e3 Mon Sep 17 00:00:00 2001
309 -From: Lars Uebernickel <lars.uebernickel@×××××××××.com>
310 -Date: Wed, 28 May 2014 14:11:02 +0200
311 -Subject: [PATCH 2/3] window: Make the drawing robust across all themes
312 -
313 -There are lots of themes out there in the wild that do not specify a
314 -background-color for all widgets and the default is transparent. This
315 -is usually not a problem because GTK+ sets an opaque region on the
316 -whole window and things without a background-color get drawn with the
317 -theme's default background colour. However, to achieve transparency
318 -we disable the opaque region by making the window app-paintable. This
319 -can lead to transparent menubars or notebook tabs in some themes. We
320 -can avoid this by ensuring that the window always renders a background.
321 -
322 -https://bugzilla.gnome.org/show_bug.cgi?id=730016
323 ----
324 - src/terminal-window.c | 21 +++++++++++++++++++++
325 - 1 file changed, 21 insertions(+)
326 -
327 -diff --git a/src/terminal-window.c b/src/terminal-window.c
328 -index 020c6f0..a9f3ff7 100644
329 ---- a/src/terminal-window.c
330 -+++ b/src/terminal-window.c
331 -@@ -2295,6 +2295,26 @@ terminal_window_realize (GtkWidget *widget)
332 - }
333 -
334 - static gboolean
335 -+terminal_window_draw (GtkWidget *widget,
336 -+ cairo_t *cr)
337 -+{
338 -+ if (gtk_widget_get_app_paintable (widget))
339 -+ {
340 -+ GtkStyleContext *context;
341 -+ int width;
342 -+ int height;
343 -+
344 -+ context = gtk_widget_get_style_context (widget);
345 -+ width = gtk_widget_get_allocated_width (widget);
346 -+ height = gtk_widget_get_allocated_height (widget);
347 -+ gtk_render_background (context, cr, 0, 0, width, height);
348 -+ gtk_render_frame (context, cr, 0, 0, width, height);
349 -+ }
350 -+
351 -+ return GTK_WIDGET_CLASS (terminal_window_parent_class)->draw (widget, cr);
352 -+}
353 -+
354 -+static gboolean
355 - terminal_window_state_event (GtkWidget *widget,
356 - GdkEventWindowState *event)
357 - {
358 -@@ -2832,6 +2852,7 @@ terminal_window_class_init (TerminalWindowClass *klass)
359 -
360 - widget_class->show = terminal_window_show;
361 - widget_class->realize = terminal_window_realize;
362 -+ widget_class->draw = terminal_window_draw;
363 - widget_class->window_state_event = terminal_window_state_event;
364 - widget_class->screen_changed = terminal_window_screen_changed;
365 - widget_class->style_updated = terminal_window_style_updated;
366 ---
367 -2.10.0
368 -
369 -
370 -From 682a729942c07c375fbc075484bc49f188be40cd Mon Sep 17 00:00:00 2001
371 -From: "Owen W. Taylor" <otaylor@××××××××.net>
372 -Date: Fri, 13 Nov 2015 15:16:42 +0100
373 -Subject: [PATCH 3/3] screen, window: Extra padding around transparent
374 - terminals in Wayland
375 -
376 -https://bugzilla.redhat.com/show_bug.cgi?id=1207943
377 ----
378 - src/terminal-screen.c | 40 +++++++++++++++++++++++++++++++++++++---
379 - src/terminal-window.c | 18 ++++++++++++------
380 - 2 files changed, 49 insertions(+), 9 deletions(-)
381 -
382 -diff --git a/src/terminal-screen.c b/src/terminal-screen.c
383 -index eab0cec..5d321a7 100644
384 ---- a/src/terminal-screen.c
385 -+++ b/src/terminal-screen.c
386 -@@ -137,6 +137,8 @@ static void terminal_screen_system_font_changed_cb (GSettings *,
387 - static gboolean terminal_screen_popup_menu (GtkWidget *widget);
388 - static gboolean terminal_screen_button_press (GtkWidget *widget,
389 - GdkEventButton *event);
390 -+static void terminal_screen_hierarchy_changed (GtkWidget *widget,
391 -+ GtkWidget *previous_toplevel);
392 - static gboolean terminal_screen_do_exec (TerminalScreen *screen,
393 - FDSetupData *data,
394 - GError **error);
395 -@@ -482,6 +484,7 @@ terminal_screen_class_init (TerminalScreenClass *klass)
396 - widget_class->drag_data_received = terminal_screen_drag_data_received;
397 - widget_class->button_press_event = terminal_screen_button_press;
398 - widget_class->popup_menu = terminal_screen_popup_menu;
399 -+ widget_class->hierarchy_changed = terminal_screen_hierarchy_changed;
400 -
401 - terminal_class->child_exited = terminal_screen_child_exited;
402 -
403 -@@ -885,6 +888,32 @@ terminal_screen_profile_changed_cb (GSettings *profile,
404 - }
405 -
406 - static void
407 -+update_toplevel_transparency (TerminalScreen *screen)
408 -+{
409 -+ GtkWidget *widget = GTK_WIDGET (screen);
410 -+ TerminalScreenPrivate *priv = screen->priv;
411 -+ GSettings *profile = priv->profile;
412 -+ GtkWidget *toplevel;
413 -+
414 -+ toplevel = gtk_widget_get_toplevel (widget);
415 -+ if (toplevel != NULL && gtk_widget_is_toplevel (toplevel))
416 -+ {
417 -+ gboolean transparent;
418 -+
419 -+ transparent = g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_TRANSPARENT_BACKGROUND);
420 -+ if (gtk_widget_get_app_paintable (toplevel) != transparent)
421 -+ {
422 -+ gtk_widget_set_app_paintable (toplevel, transparent);
423 -+
424 -+ /* The opaque region of the toplevel isn't updated until the toplevel is allocated;
425 -+ * set_app_paintable() doesn't force an allocation, so do that manually.
426 -+ */
427 -+ gtk_widget_queue_resize (toplevel);
428 -+ }
429 -+ }
430 -+}
431 -+
432 -+static void
433 - update_color_scheme (TerminalScreen *screen)
434 - {
435 - GtkWidget *widget = GTK_WIDGET (screen);
436 -@@ -962,9 +991,7 @@ update_color_scheme (TerminalScreen *screen)
437 - vte_terminal_set_color_highlight (VTE_TERMINAL (screen), highlight_bgp);
438 - vte_terminal_set_color_highlight_foreground (VTE_TERMINAL (screen), highlight_fgp);
439 -
440 -- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
441 -- if (toplevel != NULL && gtk_widget_is_toplevel (toplevel))
442 -- gtk_widget_set_app_paintable (toplevel, transparent);
443 -+ update_toplevel_transparency (screen);
444 - }
445 -
446 - static void
447 -@@ -1567,6 +1594,13 @@ terminal_screen_do_popup (TerminalScreen *screen,
448 - terminal_screen_popup_info_unref (info);
449 - }
450 -
451 -+static void
452 -+terminal_screen_hierarchy_changed (GtkWidget *widget,
453 -+ GtkWidget *previous_toplevel)
454 -+{
455 -+ update_toplevel_transparency (TERMINAL_SCREEN (widget));
456 -+}
457 -+
458 - static gboolean
459 - terminal_screen_button_press (GtkWidget *widget,
460 - GdkEventButton *event)
461 -diff --git a/src/terminal-window.c b/src/terminal-window.c
462 -index a9f3ff7..d09484e 100644
463 ---- a/src/terminal-window.c
464 -+++ b/src/terminal-window.c
465 -@@ -2300,15 +2300,21 @@ terminal_window_draw (GtkWidget *widget,
466 - {
467 - if (gtk_widget_get_app_paintable (widget))
468 - {
469 -+ GtkAllocation child_allocation;
470 - GtkStyleContext *context;
471 -- int width;
472 -- int height;
473 -+ GtkWidget *child;
474 -+
475 -+ /* Get the *child* allocation, so we don't overwrite window borders */
476 -+ child = gtk_bin_get_child (GTK_BIN (widget));
477 -+ gtk_widget_get_allocation (child, &child_allocation);
478 -
479 - context = gtk_widget_get_style_context (widget);
480 -- width = gtk_widget_get_allocated_width (widget);
481 -- height = gtk_widget_get_allocated_height (widget);
482 -- gtk_render_background (context, cr, 0, 0, width, height);
483 -- gtk_render_frame (context, cr, 0, 0, width, height);
484 -+ gtk_render_background (context, cr,
485 -+ child_allocation.x, child_allocation.y,
486 -+ child_allocation.width, child_allocation.height);
487 -+ gtk_render_frame (context, cr,
488 -+ child_allocation.x, child_allocation.y,
489 -+ child_allocation.width, child_allocation.height);
490 - }
491 -
492 - return GTK_WIDGET_CLASS (terminal_window_parent_class)->draw (widget, cr);
493 ---
494 -2.10.0
495 -
496
497 diff --git a/x11-terms/gnome-terminal/gnome-terminal-3.22.2.ebuild b/x11-terms/gnome-terminal/gnome-terminal-3.22.2.ebuild
498 index 0ef374d387c..8ca6e4999c7 100644
499 --- a/x11-terms/gnome-terminal/gnome-terminal-3.22.2.ebuild
500 +++ b/x11-terms/gnome-terminal/gnome-terminal-3.22.2.ebuild
501 @@ -8,6 +8,8 @@ inherit autotools gnome2 readme.gentoo-r1
502
503 DESCRIPTION="The Gnome Terminal"
504 HOMEPAGE="https://wiki.gnome.org/Apps/Terminal/"
505 +SRC_URI="${SRC_URI}
506 + !vanilla? ( https://dev.gentoo.org/~mgorny/dist/gnome-terminal-3.22.0-transparency.patch.xz )"
507
508 LICENSE="GPL-3+"
509 SLOT="0"
510 @@ -45,7 +47,7 @@ src_prepare() {
511 if ! use vanilla; then
512 # OpenSuSE patches, https://bugzilla.gnome.org/show_bug.cgi?id=695371
513 # http://pkgs.fedoraproject.org/cgit/rpms/gnome-terminal.git/tree/gnome-terminal-transparency-notify.patch (first 3 parts)
514 - eapply "${FILESDIR}"/${PN}-3.22.0-transparency.patch
515 + eapply "${WORKDIR}"/${PN}-3.22.0-transparency.patch
516 eautoreconf
517 fi
518 gnome2_src_prepare