[gtk+/wip/csd-for-review] Make title buttons unfocusable



commit 6ca5b8a7709b290e93321c38a2c2cac1d77227a4
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 9 22:37:20 2013 -0500

    Make title buttons unfocusable
    
    It is pretty unexpected to have the focus up in the decorations
    after clicking on maximize, so avoid that but making the buttons
    unfocusable.

 gtk/gtkwindow.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 7dc96a8..217a301 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4961,19 +4961,21 @@ create_decoration (GtkWidget *widget)
                           priv->title_label, TRUE, TRUE, 0);
 
       priv->title_close_button = gtk_button_new_with_label ("×");
+      gtk_widget_set_can_focus (priv->title_close_button, FALSE);
       gtk_box_pack_end (GTK_BOX (priv->title_box), priv->title_close_button,
                         FALSE, FALSE, 0);
       g_signal_connect (priv->title_close_button, "clicked",
                         G_CALLBACK (gtk_window_title_close_clicked), window);
 
       priv->title_max_button = gtk_button_new_with_label ("\342\226\253");
-
+      gtk_widget_set_can_focus (priv->title_max_button, FALSE);
       gtk_box_pack_end (GTK_BOX (priv->title_box), priv->title_max_button,
                         FALSE, FALSE, 0);
       g_signal_connect (priv->title_max_button, "clicked",
                         G_CALLBACK (gtk_window_title_max_clicked), window);
 
       priv->title_min_button = gtk_button_new_with_label ("_");
+      gtk_widget_set_can_focus (priv->title_min_button, FALSE);
       gtk_box_pack_end (GTK_BOX (priv->title_box), priv->title_min_button,
                         FALSE, FALSE, 0);
       g_signal_connect (priv->title_min_button, "clicked",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]