summaryrefslogtreecommitdiff
path: root/extra/gdm/correctly-give-focus-to-user-chooser.patch
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/gdm/correctly-give-focus-to-user-chooser.patch
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/gdm/correctly-give-focus-to-user-chooser.patch')
-rw-r--r--extra/gdm/correctly-give-focus-to-user-chooser.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/extra/gdm/correctly-give-focus-to-user-chooser.patch b/extra/gdm/correctly-give-focus-to-user-chooser.patch
new file mode 100644
index 000000000..e08675a36
--- /dev/null
+++ b/extra/gdm/correctly-give-focus-to-user-chooser.patch
@@ -0,0 +1,46 @@
+From b971eb1038cb92ed8211b68a7d2a99a98d86ed7f Mon Sep 17 00:00:00 2001
+From: Vincent Untz <vuntz@gnome.org>
+Date: Wed, 12 Jan 2011 18:38:46 +0100
+Subject: [PATCH] Correctly give focus to the user chooser on startup
+
+We manually handle how focus works in the GdmChooserWidget container,
+and we try to automatically move the focus to the treeview inside the
+chooser. However, it fails the first time because the treeview is not
+realized yet and the logic in the code assumes that if focus moved to
+the chooser, it moved to the treeview, so later attempt to get the focus
+grabbed by the treeview are just ignored.
+
+It works fine when using gtk_widget_child_focus() to give the focus to
+the treeview. And this makes more sense since the chooser is a container
+anyway.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=629310
+---
+ gui/simple-greeter/gdm-chooser-widget.c | 6 +-----
+ 1 files changed, 1 insertions(+), 5 deletions(-)
+
+diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
+index db2d9b2..ebbfdb9 100644
+--- a/gui/simple-greeter/gdm-chooser-widget.c
++++ b/gui/simple-greeter/gdm-chooser-widget.c
+@@ -910,17 +910,13 @@ _grab_focus (GtkWidget *widget)
+
+ foc_widget = GDM_CHOOSER_WIDGET (widget)->priv->items_view;
+ g_debug ("GdmChooserWidget: grabbing focus");
+- if (! gtk_widget_get_realized (foc_widget)) {
+- g_debug ("GdmChooserWidget: not grabbing focus - not realized");
+- return;
+- }
+
+ if (gtk_widget_has_focus (foc_widget)) {
+ g_debug ("GdmChooserWidget: not grabbing focus - already has it");
+ return;
+ }
+
+- gtk_widget_grab_focus (foc_widget);
++ gtk_widget_child_focus (foc_widget, GTK_DIR_TAB_FORWARD);
+ }
+
+ static void
+--
+1.7.3.4