From db7efca4ea17fbf628e1f42bd37b9c1f63a5bd2c349fc7d937315a8a71a4a5d4 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 14 Jan 2011 08:57:43 +0000 Subject: [PATCH] Accepting request 58009 from home:vuntz:branches:GNOME:Factory Lovely one! Thanks for this... minus one click every morning OBS-URL: https://build.opensuse.org/request/show/58009 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=148 --- gdm-focus-user-chooser.patch | 42 ++++++++++++++++++++++++++++++++++++ gdm.changes | 6 ++++++ gdm.spec | 3 +++ 3 files changed, 51 insertions(+) create mode 100644 gdm-focus-user-chooser.patch diff --git a/gdm-focus-user-chooser.patch b/gdm-focus-user-chooser.patch new file mode 100644 index 0000000..7b25973 --- /dev/null +++ b/gdm-focus-user-chooser.patch @@ -0,0 +1,42 @@ +commit b971eb1038cb92ed8211b68a7d2a99a98d86ed7f +Author: Vincent Untz +Date: Wed Jan 12 18:38:46 2011 +0100 + + 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 + +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 diff --git a/gdm.changes b/gdm.changes index e5c10df..bd27094 100644 --- a/gdm.changes +++ b/gdm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 11 12:57:17 CET 2011 - vuntz@opensuse.org + +- Add gdm-focus-user-chooser.patch: correctly give the focus to the + user chooser on startup. Fix bnc#652938. + ------------------------------------------------------------------- Thu Dec 16 14:35:30 CET 2010 - vuntz@opensuse.org diff --git a/gdm.spec b/gdm.spec index 18f9f7c..871c0f4 100644 --- a/gdm.spec +++ b/gdm.spec @@ -57,6 +57,8 @@ Patch2: gdm-helper-directory.patch Patch3: gdm-is-not-unstable-unless.patch # PATCH-FIX-UPSTREAM gdm-vt-allocation-hack.patch bgo511168 hpj@novell.com -- Needed for user switching. Needed only for 11.3 and earlier Patch4: gdm-vt-allocation-hack.patch +# PATCH-FIX-UPSTREAM gdm-focus-user-chooser.patch bgo#629310 bnc#652938 vuntz@opensuse.org -- Correctly give the focus to the user chooser on startup +Patch5: gdm-focus-user-chooser.patch # PATCH-FIX-OPENSUSE gdm-desktop-session-env-pam.patch bnc427744 vuntz@novell.com -- Sets a PAM environment variable to let the pam gnome-keyring module know which session is started Patch6: gdm-desktop-session-env-pam.patch # PATCH-FIX-OPENSUSE gdm-suse-xsession.patch vuntz@novell.com -- Use the /etc/X11/xdm/* scripts @@ -151,6 +153,7 @@ translation-update-upstream %if 0%{?suse_version} <= 1130 %patch4 -p1 %endif +%patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1