diff options
author | liuyi92 <[email protected]> | 2018-03-28 14:21:43 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-03-29 19:49:04 +0200 |
commit | e1b834a2bf684ac4a7d4b33fbf216d65896889c6 (patch) | |
tree | 990e0180cd96bd3e63b45b4cb2c45b9c56249180 /src | |
parent | 6f49c629a1a80a3aac839279e82eca3c5f2d040a (diff) | |
download | mate-terminal-e1b834a2bf684ac4a7d4b33fbf216d65896889c6.tar.bz2 mate-terminal-e1b834a2bf684ac4a7d4b33fbf216d65896889c6.tar.xz |
fix setting transparency issue when used in GNOME3
Diffstat (limited to 'src')
-rw-r--r-- | src/terminal-screen.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/terminal-screen.c b/src/terminal-screen.c index 73fa9ae..746a53d 100644 --- a/src/terminal-screen.c +++ b/src/terminal-screen.c @@ -1138,6 +1138,25 @@ update_color_scheme (TerminalScreen *screen) if (bold_rgba) vte_terminal_set_color_bold (VTE_TERMINAL (screen), bold_rgba); + + /* In case of being used in GNOME3 desktop environment. + * code references to gnome-terminal + */ + if (bg_type == TERMINAL_BACKGROUND_TRANSPARENT) + { + /* toplevel widget */ + GtkWidget *toplevel; + toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen)); + if (toplevel != NULL && gtk_widget_is_toplevel (toplevel) + && !gtk_widget_get_app_paintable (toplevel)) + { + gtk_widget_set_app_paintable (toplevel, TRUE); + /* The opaque region of the toplevel isn't updated until the toplevel is allocated; + * set_app_paintable() doesn't force an allocation, so do that manually. + */ + gtk_widget_queue_resize (toplevel); + } + } } void |