aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-01-09 05:52:27 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-01-09 05:52:27 +0100
commit9de3a0976d62cdda33cb4d6ada32a6672346fad8 (patch)
tree98c19cdfa630b45b375544abfcd9a117b75bf1db /src
parent800a381129a6cab50a63be9491b469532a653730 (diff)
downloadlogdiag-9de3a0976d62cdda33cb4d6ada32a6672346fad8.tar.gz
logdiag-9de3a0976d62cdda33cb4d6ada32a6672346fad8.tar.xz
logdiag-9de3a0976d62cdda33cb4d6ada32a6672346fad8.zip
Ensure that the canvas is focused.
Diffstat (limited to 'src')
-rw-r--r--src/ld-window-main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ld-window-main.c b/src/ld-window-main.c
index d22f400..2ea06b5 100644
--- a/src/ld-window-main.c
+++ b/src/ld-window-main.c
@@ -355,6 +355,8 @@ ld_window_main_init (LdWindowMain *self)
action_set_sensitive (self, "Delete", FALSE);
action_set_sensitive (self, "SelectAll", FALSE);
+ gtk_widget_grab_focus (GTK_WIDGET (priv->canvas));
+
/* Realize the window. */
gtk_widget_show_all (GTK_WIDGET (self));
}
@@ -499,6 +501,9 @@ load_category_cb (gpointer data, gpointer user_data)
gtk_container_add (GTK_CONTAINER (button), img);
gtk_container_add (GTK_CONTAINER (item), button);
+ /* Don't steal focus from the canvas. */
+ g_object_set (button, "can-focus", FALSE, NULL);
+
/* Assign the category to the toggle button. */
g_object_ref (cat);
g_object_set_data_full (G_OBJECT (button),