Commit Graph

159 Commits

Author SHA1 Message Date
Ray Strode
02c6b0374d gdm: make user list fade-in on vt switch more reliable
We fade out the authentication prompt when a user successfully
logs into a user session. We reset it and fade it back in when
the user switches back to the login screen VT.

The problem is, we only fade it back in if the auth prompt status is
VERIFICATION_SUCCEEDED.  It's possible for it to be NOT_VERIFYING
if the authprompt gets reset for some other reason in the interim.

This commit changes the check to be more precise. We now only skip
the fade-in, if we're already faded in, and we only skip the reset if
we're already reset.

https://bugzilla.gnome.org/show_bug.cgi?id=753181
2015-08-05 09:40:15 -04:00
Ray Strode
0003760fd9 gdm: fix banner allocation computation
The code to figure how how much room that banner had was wrong.
This commit fixes it.

https://bugzilla.gnome.org/show_bug.cgi?id=751517
2015-06-25 16:04:14 -04:00
Clément Guérin
8e802fd32f gdm: use integer coordinates for login dialog actors
If the login screen actors aren't placed at pixel
boundaries then they will show up blurred with fuzzy
text.

This commit ensures all actor allocations are floored
to integer coordinates.

https://bugzilla.gnome.org/show_bug.cgi?id=746912
2015-03-27 17:25:06 -04:00
Florian Müllner
9934529a0b loginDialog: Move long session-list menus to the side
Currently the menu position below the button means that the menu
can extend to roughly half the screen height before ending up partly
off-screen. This is plenty of space for commonly installed sessions,
but some users have a significantly higher number of sessions in the
list. Move the menu to the side of the button in that case to maximize
the vertical space the menu may take up.

https://bugzilla.gnome.org/show_bug.cgi?id=734352
2015-03-23 20:25:21 +01:00
Ray Strode
e5270cb6ec Revert "loginDialog: Don't arbitrarily pick a random session for the user"
This reverts commit 6d40cb98e7.

https://bugzilla.gnome.org/show_bug.cgi?id=740142
2015-03-18 12:44:37 -04:00
Ray Strode
ee360d8749 Revert "loginDialog: Better handle setting the active session"
This reverts commit 681861c8c7.

https://bugzilla.gnome.org/show_bug.cgi?id=740142
2015-03-18 12:44:37 -04:00
Ray Strode
b1de1ada25 gdm: fix empty user list on user switching
There's some vestigial code for hiding the user list
that runs at the same time its parent is hidden.

Only the parent should be hidden, at this point, so
there's situations where the user list hides and
never comes back.

This commit fixes that, by deleting the vestigial code.

https://bugzilla.gnome.org/show_bug.cgi?id=719418
2015-03-17 12:22:06 -04:00
Jasper St. Pierre
681861c8c7 loginDialog: Better handle setting the active session
We currently use the setActiveSession method to both mark a menu item as
selected, and also tell gdm about the current session the user selected.

Since gdm is ultimately in charge of the state, we should decouple this
and simply ask gdm to set the session, and have the menu item reflect
what gdm thinks is the current session.

This prevents state getting mismatched and oscillations from happening,
where we get in a loop of constantly telling gdm what the session is.

https://bugzilla.gnome.org/show_bug.cgi?id=740142
2015-03-16 17:47:27 -04:00
Jasper St. Pierre
6d40cb98e7 loginDialog: Don't arbitrarily pick a random session for the user
gdm should be in charge of telling us the default session, and it
should pick one for the user if she doesn't already have one.

https://bugzilla.gnome.org/show_bug.cgi?id=740142
2015-03-16 17:47:27 -04:00
Florian Müllner
8eb0782f25 loginDialog: Pass-through UserWidget's label-actor
https://bugzilla.gnome.org/show_bug.cgi?id=729603
2015-03-06 17:24:13 +01:00
David Liang
e23a03d639 gdm: prevent nextSignalId from being connected multiply times
The problem is caused by '_askForUsernameAndBeginVerification' being
called multiply times. So when we click 'next', the old connected
function will also be executed.
2015-02-26 15:45:12 -05:00
Ray Strode
d04340c675 loginDialog: fix reactivity of first user in user list
After the login banner is shown and hidden, the first user
in the user list becomes non-reactive.  This is because the
banner is given an opacity of 0, but still allocated.

This commit fixes that by hiding the banner explicitly.

https://bugzilla.gnome.org/show_bug.cgi?id=743370
2015-01-22 16:56:31 -05:00
Ray Strode
c556d28b98 loginDialog: reset greeter proxy on auth prompt reset
Normally when a user uses the login screen to log in, the
login screen gets killed and the user session takes over
the display.

This doesn't happen for wayland sessions, though. Instead,
the login screen gets reset, and the wayland session is started
on another VT.

The greeter proxy object needs to be recreated after this reset,
since it's associated with state no longer coupled to the login
screen after the reset.

This commit moves greeter proxy creation to happen at reset time.

https://bugzilla.gnome.org/show_bug.cgi?id=743371
2015-01-22 14:02:50 -05:00
Florian Müllner
e0eebc90e0 Rename KeyBindingMode to ActionMode
The keybinding mode is no longer used exclusively for actions triggered
by keybindings, so reflect this by a more generic name.

https://bugzilla.gnome.org/show_bug.cgi?id=740237
2014-12-19 11:39:50 +01:00
Ray Strode
7b9be2188a loginDialog: use two column view if banner message long
Frequently banner messages are longer than can reasonable
fit in a one column view, which leads to a smooshed layout.

This commit changes the layout to a two column view, with the
banner on the left and the prompt on the right, if the banner
message is long enough that it can't fit well above the prompt.
If there isn't enough space for two columns then we keep the
one column layout but add scrollbars.

https://bugzilla.gnome.org/show_bug.cgi?id=703972
2014-12-18 13:58:10 -05:00
Ray Strode
117a81e06f loginDialog: display banner message when disable-user-list=true
The login screen supports showing a banner message which admins
can use to mention login rules or disclaimers.

This message only shows up currently if the user list is enabled.
Most people who want to show a banner message also want to disable
the user list.

This commit moves the banner message to display when the user is
prompted for login credentials instead of when showing the user
list. It also adds a scrollbar if the message is too long.

https://bugzilla.gnome.org/show_bug.cgi?id=703972
2014-12-18 13:58:09 -05:00
Ray Strode
522fe8e8bf loginDialog: allocate children manually
The login screen is pretty custom full screen container and the standard
layout managers aren't really a good fit for the kind of layout that's
happening. This will be even more problematic with upcoming changes
to login banners, so we need to switch techniques.

This commit moves login dialog over to using a custom allocate handler
that has specific domain knowledge of the parts of the login screen
and where they go.

https://bugzilla.gnome.org/show_bug.cgi?id=703972
2014-12-18 13:58:09 -05:00
Ray Strode
5961f162fa gdm: fix sensitivity of auth prompt when cancelling early and user list is disabled
If the user list is disabled and the user clicks cancel quickly enough
after typing their username, they can get in a state where the
auth prompt gets stuck in the insensitive state.

This is because the login dialog code makes the prompt insensitive
while while pam is processing the provided username, but the prompt
only makes itself sensitive again when it is hidden.

This commit makes it sensitive right before asking for a username again.

https://bugzilla.gnome.org/show_bug.cgi?id=740141
2014-11-17 12:11:03 -05:00
Jasper St. Pierre
0f63ad0fc1 gdm: Don't throw an error if there's no logo file 2014-10-14 20:00:25 -07:00
Cosimo Cecchi
328bb1c21b st: always use GFile internally
We're moving the theme infrastructure towards GResource, so as a first
step move all the loading to use GFiles instead of URIs or paths.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
2014-10-14 18:53:39 -07:00
Owen W. Taylor
8d3ff56846 gdm: disconnect signals
Many signal connections on global objects and on non-widgets were not
disconnected when the unlock screen was destroyed, causing leaks.

https://bugzilla.gnome.org/show_bug.cgi?id=738256
2014-10-13 11:50:11 -04:00
Jasper St. Pierre
589e6c29f3 loginDialog: Push a modal for LOCK_SCREEN
So that we're in the correct keybinding mode.
2014-07-27 08:18:51 -04:00
Jasper St. Pierre
4b46533ce8 loginDialog: Fix the removal from the ctrlAltTabManager
When we ported away from ModalDialog, we forgot to change this one
reference to the dialog layout. Change it now.
2014-07-27 08:12:27 -04:00
Jasper St. Pierre
83cb26d70e js: Adapt to GSettings API change
The 'schema' property has been deprecated for a long time. Even though
this will likely be reverted in glib, let's stop using it.
2014-06-24 15:17:09 -04:00
Florian Müllner
2a63267be0 loginDialog: Remove unused variable 2014-05-28 22:01:54 +02:00
Bastien Nocera
cd2bd7685a js: Name all the timeouts and idles
With very uninventive names. Names now, good names later.

https://bugzilla.gnome.org/show_bug.cgi?id=727983
2014-04-10 21:08:16 +02:00
Cosimo Cecchi
9c88fec4fc texture-cache: use scale factor for load_uri_async()
https://bugzilla.gnome.org/show_bug.cgi?id=726907
2014-03-28 10:53:01 -07:00
Jasper St. Pierre
be291ee4f9 loginScreen: reset greeter when coming back to login screen
When a user logs in to a wayland session, we keep the login screen
running on the X server with the login screen running in a deactivated mode.

This commit makes sure it get reactivated when the user comes back to
the VT (from user switching, logout or just ctrl-alt-f1).

https://bugzilla.gnome.org/show_bug.cgi?id=726989
2014-03-25 10:41:12 -04:00
Florian Müllner
0ba05b29b9 loginDialog: Defer loading user list until needed
Loading the user list can be expensive, for instance when there is
a large number of users and/or their avatars have to be fetched over
the network. In case the user list is disabled anyway, there is no
point in doing that work just to hide it, so stop doing that.

https://bugzilla.gnome.org/show_bug.cgi?id=725905
2014-03-08 00:29:11 +01:00
Florian Müllner
ef8123e3a2 loginDialog: Add missing return value
_loadUserList() may be used as idle handler, so we should explicitly
return a boolean.

https://bugzilla.gnome.org/show_bug.cgi?id=725905
2014-03-08 00:29:10 +01:00
Ray Strode
765d0228c0 loginDialog: move user list loading after actors are constructed
Right now we queue populating the user list in the middle of setting
up the dialog actors. Of course, the actual population happens some time
later after going back to the main loop.

It's more logical to structure the code so the the actors are
instantiated first in one block and then other things after that.

This commit moves the user list population enqueuing operation to the
bottom of the constuctor.

https://bugzilla.gnome.org/show_bug.cgi?id=721868
2014-01-13 12:42:39 -05:00
Ray Strode
2d2020a20d loginDialog: defer loading user list until idle
In some cases we load the user list after going back
to main loop and in other cases we load the user list
right away (depending on if accounts service is ready).

In the case we load the user list right away we cause a
traceback because loading the user list forces a reset,
which then tries to reset actors which aren't instantiated
yet.

This commit ensures the user list is loaded after the constructor
finishes and the event loop runs irregardless of the accountsservice
state.

https://bugzilla.gnome.org/show_bug.cgi?id=721868
2014-01-13 12:42:33 -05:00
Andika Triwidada
f3dad3765e Changed obsolete FSF postal address.
https://bugzilla.gnome.org/show_bug.cgi?id=721507
2014-01-08 04:35:14 +07:00
Florian Müllner
deb2f30b37 js: Use EVENT_PROPAGATE/EVENT_STOP constants in event handlers
Just as SOURCE_CONTINUE/SOURCE_REMOVE in source functions, these
constants increase code clarity over plain true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Florian Müllner
751a3f0e94 js: Use SOURCE_CONTINUE/SOURCE_REMOVE constants in source functions
With support for boolean constants in g-i, we can finally use the
more readable constants instead of true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Florian Müllner
729c962b7c loginDialog: Implement cancel()
The screen shield expects a cancel() method on the unlockDialog
implementation, but LoginDialog does not provide it currently.

https://bugzilla.gnome.org/show_bug.cgi?id=719378
2013-11-27 14:30:24 +01:00
Jasper St. Pierre
04a00f6564 loginDialog: Use UserWidget
https://bugzilla.gnome.org/show_bug.cgi?id=706851
2013-10-30 13:19:02 -04:00
Jasper St. Pierre
8737b06559 loginDialog: MessageType is now in GdmUtil
https://bugzilla.gnome.org/show_bug.cgi?id=709286
2013-10-02 13:58:09 -04:00
Jasper St. Pierre
0b79e9cc9e loginDialog: Remove "Session" subtitle heading
It doesn't really add any value at all.

https://bugzilla.gnome.org/show_bug.cgi?id=707072
2013-08-30 10:45:46 -04:00
Ray Strode
8b977252f3 loginDialog: show session menu button when in auth failed
Right now we only show the session menu button when verifying,
but we should also show it when verification is failed or we
can end up in situation where the session menu disappears during
an authentication retry.

https://bugzilla.gnome.org/show_bug.cgi?id=707064
2013-08-29 14:02:21 -04:00
Jasper St. Pierre
41aa14eaf0 gdm: Remove constraints from authPrompt / loginDialog as well
https://bugzilla.gnome.org/show_bug.cgi?id=706843
2013-08-26 19:05:15 -04:00
Jasper St. Pierre
80ab28bc3a loginDialog: Fade in the gdm auth prompt on login 2013-08-26 18:17:35 -04:00
Jasper St. Pierre
48b7ebe1c0 loginDialog: Remove useless style class manipulation
StWidget already does this for us.
2013-08-26 18:17:35 -04:00
Jasper St. Pierre
c59cf18337 loginDialog: Provide a finish method
The screenShield expects to be able to call finish on the dialog.
2013-08-26 18:04:20 -04:00
Ray Strode
44e3811520 loginDialog: ask for username up front if disable-user-list==TRUE
Right now, we rely on PAM to ask for the username if disable-user-list
is TRUE.  This is suboptimal because it means we can't check if we
should show a session menu.

This commit changes disable-user-list==TRUE to ask for a username up
front, rather than have PAM do it.

https://bugzilla.gnome.org/show_bug.cgi?id=706607
2013-08-23 11:40:35 -04:00
Ray Strode
5f9e50175f loginDialog: add support for auth without username / fix Not Listed?
commit 93f072d1fc attempted to
add support for auth without a username to the login screen, but
do to a messed up rebase only partially added it.

This commit fixes that.

https://bugzilla.gnome.org/show_bug.cgi?id=706607
2013-08-22 15:40:55 -04:00
Ray Strode
a7bbbad185 loginDialog: consolidate message label and login hint label
Right now the login hint is showing up just above the the cancel
button, instead of just below the text entry field.

The mockup here:

https://raw.github.com/gnome-design-team/gnome-mockups/master/system-lock-login-boot/login-dissect.png

Says it should share a label with the PAM info/error messages.

This commit consolidates the two labels.

https://bugzilla.gnome.org/show_bug.cgi?id=706324
2013-08-19 15:13:01 -04:00
Ray Strode
93f072d1fc authPrompt: add support for auth without username
This commit introduces a new BeginRequestType enum which gets
passed to the 'reset' signal to specify whether
a username should be provided to the begin() method and changes
the loginDialog to comply.

Currently, the signal only ever gets emitted with

AuthPrompt.BeginRequestType.PROVIDE_USERNAME

but that will change in the future when providing smartcard
support.

https://bugzilla.gnome.org/show_bug.cgi?id=683437
2013-08-18 21:14:35 -04:00
Ray Strode
945b357ed8 loginDialog: fix session menu visibility
The shouldShowSessionMenu function has a few bugs in it.
This fixes them.

https://bugzilla.gnome.org/show_bug.cgi?id=706153
2013-08-16 14:10:21 -04:00
Ray Strode
bb2599eb30 loginDialog: fix up cancel button visibility
This commit makes sure we hide when there's nothing to cancel
to and show it when there's something to cancel to.

https://bugzilla.gnome.org/show_bug.cgi?id=683437
2013-08-08 10:55:34 -04:00