Date: Wednesday, January 12, 2011 @ 13:14:53 Author: ibiru Revision: 105828
upgpkg: gdm 2.32.0-5 fix focus to the user chooser on startup Added: gdm/trunk/correctly-give-focus-to-user-chooser.patch Modified: gdm/trunk/PKGBUILD --------------------------------------------+ PKGBUILD | 5 ++ correctly-give-focus-to-user-chooser.patch | 46 +++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2011-01-12 14:39:36 UTC (rev 105827) +++ PKGBUILD 2011-01-12 18:14:53 UTC (rev 105828) @@ -2,7 +2,7 @@ # Maintainer: Jan de Groot <[email protected]> pkgname=gdm pkgver=2.32.0 -pkgrel=4 +pkgrel=5 pkgdesc="Gnome Display Manager (a reimplementation of xdm)" arch=('i686' 'x86_64') license=('GPL') @@ -21,6 +21,7 @@ gdm-vt-allocation-hack.patch 0001-port-to-libpanel-applet-3.0.patch 0001-Fix-version-in-login-window-when-file-is-empty.patch + correctly-give-focus-to-user-chooser.patch gdm.pam gdm-autologin.pam gdm) @@ -29,6 +30,7 @@ '3c8b588d4af08d94dc93bcd5e4c2a983c3f4fbbbe40833bceac2a1df4f1e8215' '41ca4b2408d61776ab42c50834374a90664d43d33ad7034c7c52862d9bf3234a' '9bcdb1a977e93824ef5f693610a964790befa3dd7e7662746fb8ba1212ecdefd' + 'ab6d9739c0cc3631d077a897291d6a38fea1c713a3647d008e2635f48c503cb4' 'f1dfa4d88288d4b0a631a68a51b46c2da537bee8fe5a99f9f288c8ff75a50b19' '3daff680ff6b7ea56f84f40843e46e72477c81e9e405028203c942af04d07ae5' '272c08d8e8b50bf424d0705ac864d4c18c47ec4f6893b1af732c2efbc86c9550') @@ -39,6 +41,7 @@ patch -Np1 -i "${srcdir}/gdm-vt-allocation-hack.patch" patch -Np1 -i "${srcdir}/0001-port-to-libpanel-applet-3.0.patch" patch -Np1 -i "${srcdir}/0001-Fix-version-in-login-window-when-file-is-empty.patch" + patch -Np1 -i "${srcdir}/correctly-give-focus-to-user-chooser.patch" autoreconf -fi ./configure --prefix=/usr --sysconfdir=/etc \ Added: correctly-give-focus-to-user-chooser.patch =================================================================== --- correctly-give-focus-to-user-chooser.patch (rev 0) +++ correctly-give-focus-to-user-chooser.patch 2011-01-12 18:14:53 UTC (rev 105828) @@ -0,0 +1,46 @@ +From b971eb1038cb92ed8211b68a7d2a99a98d86ed7f Mon Sep 17 00:00:00 2001 +From: Vincent Untz <[email protected]> +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
