After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 592183 - GDM entry field loses focus after dialogs are presented
GDM entry field loses focus after dialogs are presented
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.27.x
Other Linux
: Normal critical
: ---
Assigned To: GDM maintainers
GDM maintainers
: 589792 591081 598235 619963 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-08-18 09:17 UTC by XuJin
Modified: 2010-06-17 03:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for gui/simple-greeter/gdm-greeter-login-window.[ch], gui/simple-greeter/gdm-greeter-panel.[ch], gui/simple-greeter/gdm-greeter-session.c, gui/simple-greeter/gdm-language-option-widget.[ch] (7.70 KB, patch)
2009-08-24 08:21 UTC, Takao Fujiwara
needs-work Details | Review
Patch for gui/simple-greeter/gdm-greeter-panel.[ch], gui/simple-greeter/gdm-greeter-session.c, gui/simple-greeter/gdm-language-option-widget.[ch] (6.03 KB, patch)
2009-08-25 06:50 UTC, Takao Fujiwara
none Details | Review
Patch for gui/simple-greeter/gdm-greeter-panel.[ch], gui/simple-greeter/gdm-greeter-session.c, gui/simple-greeter/gdm-language-option-widget.[ch] gui/simple-greeter/gdm-layout-option-widget.[ch] (9.03 KB, patch)
2009-09-07 01:44 UTC, Takao Fujiwara
committed Details | Review

Description XuJin 2009-08-18 09:17:21 UTC
(1) Install Ubuntu9.04 and then update to the latest build.
(2) From the login screen, select a user, and then go to language->other to pick up a language. After that, the input box for password is not accessible.
(3) The user has to click "Cancel" and select the language from the "recent
language" list on the second try. Then password input box works well.
Comment 1 Halton Huo 2009-08-18 09:22:01 UTC
This bug is also reproducible on Solaris platform.
Comment 2 Takao Fujiwara 2009-08-24 08:21:15 UTC
Created attachment 141532 [details] [review]
Patch for gui/simple-greeter/gdm-greeter-login-window.[ch], gui/simple-greeter/gdm-greeter-panel.[ch], gui/simple-greeter/gdm-greeter-session.c, gui/simple-greeter/gdm-language-option-widget.[ch]

I investigated this issue.
When GDM Language Chooser Widget is launched, the window is focused/grabbed.

So after the language dialog is closed, need to focus on Greeter Login Window again.

When the dialog is closed, gdm_language_option_widget_hide_dialog() is called.
However currently there is no way to communicate GdmLanguageOptionWidget and GdmGreeterLoginWindow.
My suggestion is to add HIDE_DIALOG signal.
Comment 3 Ray Strode [halfline] 2009-08-24 17:13:17 UTC
A few thoughts...

1)

why do you have

gdm_greeter_login_window_set_focus (login_window)

instead of say

gtk_window_present (login_window)

?

2) Does this problem happen for other cases too?  Maybe the accessibility icon?

3) Is there a reason you can't focus from LANGUAGE_SELECTED instead of creating the new siganl?

4) Does this break key nav? Say the user hits ctrl-alt-tab, focuses the panel, and then selects a language.  In that case we want focus to stay on the panel, right?
Comment 4 Takao Fujiwara 2009-08-25 06:50:04 UTC
Created attachment 141613 [details] [review]
Patch for gui/simple-greeter/gdm-greeter-panel.[ch], gui/simple-greeter/gdm-greeter-session.c, gui/simple-greeter/gdm-language-option-widget.[ch]

Revised the patch 141532.

> 1) why do you have gdm_greeter_login_window_set_focus (login_window)

You're right.
I removed gdm_greeter_login_window_set_focus() and use 
gdm_greeter_login_window_set_focus() with your suggestion.

> 2) Does this problem happen for other cases too?  Maybe the accessibility icon?

I have no idea about gnome-settings-daemon dialog.
Yes, this problem also effects the accessibility icon.
However AFAIK, the main problem is the language dialog is always launched after users select a specific user and show the password box. So probably it would be better to focus on login dialog after the language dialog is closed.
If we also fix the accessibility icon, it would be nice but I have no idea.

> 3) Is there a reason you can't focus from LANGUAGE_SELECTED instead of creating
the new siganl?

I could not resolve this problem with LANGUAGE_SELECTED yesterday.
When LANGUAGE_SELECTED signal is called, the language dialog still exists and I could not set the focus on the login dialog.
After the language dialog is destroyed, I could set the focus on the login dialog with the new signal.

> 4) Does this break key nav? Say the user hits ctrl-alt-tab, focuses the panel,

Yes, ctrl-alt-tab can change the focus but other ways doesn't change the focus.
E.g. When type Alt + l, Language combobox is focused. After the language dialog is closed, Alt + l is not enabled without the patch.
I didn't notice ctrl-alt-tab.
I guess it's not a big problem to focus on the login dialog because users can change the focus with ctrl-alt-tab again.

If you have the better fix, it would be nice.

Actually I tried to remove a focus on a widget at first but I could not succeed.
When I set a focus on the login dialog, I could type chars on the password box.
Comment 5 Brian Cameron 2009-08-31 17:37:26 UTC
*** Bug 591081 has been marked as a duplicate of this bug. ***
Comment 6 Brian Cameron 2009-08-31 17:38:17 UTC
Note in bug #591081, Sebastien Bacher says:

The keyboard layout dialog has the same issue
Comment 7 Takao Fujiwara 2009-09-07 01:44:18 UTC
Created attachment 142609 [details] [review]
Patch for gui/simple-greeter/gdm-greeter-panel.[ch], gui/simple-greeter/gdm-greeter-session.c, gui/simple-greeter/gdm-language-option-widget.[ch] gui/simple-greeter/gdm-layout-option-widget.[ch]

Revised the patch for layout option widget.
This patch works with the language dialog and keyboard layout dialog.
Comment 8 Brian Cameron 2009-09-08 21:42:17 UTC
I've tested the patch and can confirm it fixes the problem with the language widget.  On Solaris, we don't support libxklavier, so the layout dialog can't be tested.  

However, I notice that the problem still exists when you click on the a11y button on the panel.  When you close the a11y dialog, the login dialog still does not have focus and you need to press the "Cancel" button to restart the login process.
Comment 9 Takao Fujiwara 2009-09-09 01:12:59 UTC
Currently I have no idea about a11y dialog..

My understanding is the a11y dialog is launched by gdm gnome-settings-daemon and the dialog is not managed by greeter.
a11y button is shown without choosing a user. language dialog and layout dialog are shown after a user is chosen. So probably I think the language and layout issues are more critical and the a11y dialog issue is nice to have.
If there is a better way for a11y dialog, I think it should be implemented.
But if there is no idea, I'd like to suggest my patch.

I'll think again how to get the closing a11y dialog.
Comment 10 Brian Cameron 2009-09-09 01:21:59 UTC
Agreed.  I think your patch fixes a number of serious bugs, and should get accepted upstream.  The a11y dialog issue can be treated as a separate bug if we want.

However, note that you disable the user list, that the a11y issue is more serious since the user is more likely to try to run the a11y dialog after starting the login process.
Comment 11 Ray Strode [halfline] 2009-09-09 18:47:55 UTC
Comment on attachment 142609 [details] [review]
Patch for gui/simple-greeter/gdm-greeter-panel.[ch], gui/simple-greeter/gdm-greeter-session.c, gui/simple-greeter/gdm-language-option-widget.[ch] gui/simple-greeter/gdm-layout-option-widget.[ch]

I don't think this patch is exactly right, but i don't think we're going to get a better fix before 2.28, so feel free to commit it with just these changes:

1) rename hide-dialog-selected signal to dialog-hidden
2) rename layout-hide-dialog signal to dialog-hidden
Comment 12 Takao Fujiwara 2009-09-10 02:12:10 UTC
Thanks for your reviews. Commited the patch.

http://git.gnome.org./cgit/gdm/commit/?id=6def173499c2f0da3306046ebe711757bfbe9d9e

commit 6def173499c2f0da3306046ebe711757bfbe9d9e
Author: Takao Fujiwara <tfujiwar@redhat.com>
Date:   2009-09-10 11:06:08 +0900

    Focus on login dialog after language dialog or layout dialog is closed.
    Fixes bug #592183.
    
    Reviewed by Ray Strode, Brian Cameron

M       gui/simple-greeter/gdm-greeter-panel.c
M       gui/simple-greeter/gdm-greeter-panel.h
M       gui/simple-greeter/gdm-greeter-session.c
M       gui/simple-greeter/gdm-language-option-widget.c
M       gui/simple-greeter/gdm-language-option-widget.h
M       gui/simple-greeter/gdm-layout-option-widget.c
M       gui/simple-greeter/gdm-layout-option-widget.h

Since I'm not a bug reporter, please close the bug.
Comment 13 Brian Cameron 2009-09-10 02:19:09 UTC
Since there still is a problem with the a11y dialog, I think the bug should
remain open until that issue is fixed.  Or do you think that we should close this bug and open a new bug?
Comment 14 Takao Fujiwara 2009-09-10 02:29:42 UTC
You're right. It makes sense to keep this bug open.
Comment 15 Brian Cameron 2009-10-13 19:59:00 UTC
Note that bug #598235 has been filed, with an alternative way to fix this problem for the a11y button.  

I wonder if that fix also fixes the issue for the language/session dialogs.  If so, it might be a good idea to back out the fix that Takao recently wrote and use that solution instead.  Takao, thoughts?
Comment 16 Takao Fujiwara 2009-10-14 01:15:33 UTC
I think this problem can be fixed if we remove GDK_WINDOW_TYPE_HINT_DOCK with bug #598235, and I agree we need to revert this fix.

I'm not sure how to reproduce bug #587732.
Comment 17 Brian Cameron 2009-10-31 02:40:37 UTC
It's easy to reproduce.  Once you remove the GDK_WINDOW_TYPE_HINT_DOCK, you just login.  After authentication you see the dialog you shouldn't see.
Comment 18 Brian Cameron 2010-02-01 18:53:41 UTC
*** Bug 598235 has been marked as a duplicate of this bug. ***
Comment 19 William Jon McCann 2010-05-28 18:18:06 UTC
*** Bug 619963 has been marked as a duplicate of this bug. ***
Comment 20 William Jon McCann 2010-05-28 18:19:43 UTC
Using the dock hint for a dialog that isn't at all a dock doesn't seem right.  I agree we need to revert that workaround.
Comment 21 Matthias Clasen 2010-05-29 16:09:08 UTC
Jon, I tried removing the dock hint and did not see any lame metacity dialogs when logging in (in rawhide), so I think we have a metacity fix in our packages, at least. So I would recommend that you simply remove the dock hint to fix the focus problem in gdm.
Comment 22 William Jon McCann 2010-06-07 21:18:49 UTC
Owen confirmed that the fix for bug 588119 will obviate the need for the workaround that caused this bug.

commit 7da5f55b967fc452db7efd6778c1b9c680e5ada7
Author: William Jon McCann <jmccann@redhat.com>
Date:   Mon Jun 7 17:04:23 2010 -0400

    Revert "Make greeter login window be a dock"
    
    This reverts commit 98a1649b17320957b9a2521af07d15ba51c187c9.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=592183
Comment 23 William Jon McCann 2010-06-17 03:53:20 UTC
*** Bug 589792 has been marked as a duplicate of this bug. ***