This is an automated email from the git hooks/post-receive script.

f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.

commit 2a4707f1267c0b5ebbe6e9a9ad193eeb82498fd5
Author: Igor <f2...@yandex.ru>
Date:   Fri Sep 16 13:36:52 2016 +0300

    Avoid notebook widget transparency seen under Unity
---
 terminal/terminal-window.c | 32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)

diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 9ebc583..f0518b4 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -215,6 +215,8 @@ static void         terminal_window_switch_tab              
      (GtkNotebook
 static void         terminal_window_move_tab                      (GtkNotebook 
           *notebook,
                                                                    gboolean    
            move_left);
 static void         terminal_window_tab_info_free                 
(TerminalWindowTabInfo  *tab_info);
+static void         terminal_window_make_child_opaque             (GtkWidget   
           *child,
+                                                                   GtkWidget   
           *window);
 
 
 
@@ -343,7 +345,7 @@ terminal_window_init (TerminalWindow *window)
     gtk_widget_set_visual (GTK_WIDGET (window), visual);
 
   /* required for vte transparency support: see 
https://bugzilla.gnome.org/show_bug.cgi?id=729884 */
-  gtk_widget_set_app_paintable (window, TRUE);
+  gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
 
   window->action_group = gtk_action_group_new ("terminal-window");
   gtk_action_group_set_translation_domain (window->action_group,
@@ -377,6 +379,7 @@ terminal_window_init (TerminalWindow *window)
                                    "show-tabs", always_show_tabs,
                                    NULL);
   gtk_widget_add_events (window->notebook, GDK_SCROLL_MASK);
+  terminal_window_make_child_opaque (window->notebook, GTK_WIDGET (window));
 
   /* set the notebook group id */
   gtk_notebook_set_group_name (GTK_NOTEBOOK (window->notebook), 
window_notebook_group);
@@ -1578,10 +1581,6 @@ static void
 terminal_window_action_show_menubar (GtkToggleAction *action,
                                      TerminalWindow  *window)
 {
-  GtkStyleContext *context;
-  GtkStateFlags    state;
-  GdkRGBA          bg;
-
   terminal_return_if_fail (GTK_IS_UI_MANAGER (window->ui_manager));
 
   terminal_window_size_push (window);
@@ -1593,12 +1592,7 @@ terminal_window_action_show_menubar (GtkToggleAction 
*action,
           window->menubar = gtk_ui_manager_get_widget (window->ui_manager, 
"/main-menu");
           gtk_box_pack_start (GTK_BOX (window->vbox), window->menubar, FALSE, 
FALSE, 0);
           gtk_box_reorder_child (GTK_BOX (window->vbox), window->menubar, 0);
-
-          /* make menubar opaque */
-          context = gtk_widget_get_style_context (GTK_WIDGET (window));
-          state = gtk_widget_get_state_flags (GTK_WIDGET (window));
-          gtk_style_context_get_background_color (context, state, &bg);
-          gtk_widget_override_background_color (window->menubar, state, &bg);
+          terminal_window_make_child_opaque (window->menubar, GTK_WIDGET 
(window));
         }
 
       gtk_widget_show (window->menubar);
@@ -2172,6 +2166,22 @@ terminal_window_tab_info_free (TerminalWindowTabInfo 
*tab_info)
 
 
 
+static void
+terminal_window_make_child_opaque (GtkWidget *child,
+                                   GtkWidget *window)
+{
+  GtkStyleContext *context;
+  GtkStateFlags    state;
+  GdkRGBA          bg;
+
+  context = gtk_widget_get_style_context (window);
+  state = gtk_widget_get_state_flags (window);
+  gtk_style_context_get_background_color (context, state, &bg);
+  gtk_widget_override_background_color (child, state, &bg);
+}
+
+
+
 /**
  * terminal_window_new:
  * @fullscreen: Whether to set the window to fullscreen.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to