Commit Graph

146 Commits

Author SHA1 Message Date
Jasper St. Pierre
dde20f0c76 screenShield: Move opening of screen shield to key press
This makes the screen shield much more responsive.

https://bugzilla.gnome.org/show_bug.cgi?id=686740
2013-03-11 15:08:20 -04:00
Florian Müllner
3b1e536822 screenShield: Drop fallback implementation
With fallback mode gone, we can no longer rely on gnome-screensaver
being installed. Rather than handling three different cases (GDM,
gnome-screensaver, no lock), disable the lock functionality when
not running under GDM.

https://bugzilla.gnome.org/show_bug.cgi?id=693403
2013-03-06 16:22:07 +01:00
Cosimo Cecchi
e6ce0057af screenShield: only pop lock-screen mode at the end of lift
This avoids the style of the top panel changing as soon as the lift key
is pressed weakening the curtain effect.

https://bugzilla.gnome.org/show_bug.cgi?id=695023
2013-03-02 17:26:28 -05:00
Giovanni Campagna
d5e647a191 ScreenShield: fix positioning of background with multimonitor
Previously, we would create one StBin per monitor, but each was positioned
at 0,0 and sized as the screen, so they would overlap and draw the box shadows
on top of the other backgrounds.
Instead, we need to size appropriately the bin, and then we need to position
the actual MetaBacgroundActor at 0,0, so add a flag to BackgroundManager
for this.
Also, get rid of MetaBackgroundGroup, they do nothing because the screenshield
is not a descendant of the MetaWindowGroup and because the widget in between
blocks the propagation of the visible region. At the same time, use a
widget, not a bin, because StBin requires you to set .child, not call add_child().

https://bugzilla.gnome.org/show_bug.cgi?id=694394
2013-02-25 14:46:40 +01:00
Ray Strode
34443da7ab screenShield: don't use Bin for BackgroundManager container
St.Bin() really only expects one child at a time, and the
BackgroundManager will add two. This can cause assertion
failures when destroying one of the background actors.

https://bugzilla.gnome.org/show_bug.cgi?id=694227
2013-02-19 21:54:00 -05:00
Ray Strode
3c8325f1f3 layout: rework background handling
This commit updates the code to use mutter's new background
api, and changes the shell's startup animation to be closer
to the mockups.

Based on initial work by Giovanni Campagna

https://bugzilla.gnome.org/show_bug.cgi?id=682429
2013-02-19 18:39:54 -05:00
Ray Strode
244121d920 loginDialog: fade out before starting session
Right now we very abruptly kill the login screen
and start the users session without any transition
out.

This commit introduces a fade out of the dialog and
panels.

https://bugzilla.gnome.org/show_bug.cgi?id=694062
2013-02-19 18:39:53 -05:00
Giovanni Campagna
b45a2d7335 ScreenShield: don't add the source actor directly to the boxlayout
StBoxLayout always fills on the orthogonal direction, so the icon
becomes distorted as the layout grows to accomodate more details.
Instead, use a bin that aligns at the start.

https://bugzilla.gnome.org/show_bug.cgi?id=693822
2013-02-17 14:53:41 +01:00
Jasper St. Pierre
4618e11406 screenShield: Fix crash with the idle monitor 2013-02-15 08:01:00 -05:00
Jasper St. Pierre
261fbef516 Update to new GnomeIdleMonitor API
https://bugzilla.gnome.org/show_bug.cgi?id=688227
2013-02-15 09:13:02 +01:00
Giovanni Campagna
4dc9540325 ScreenShield: try harder to become modal, and catch failures
The screenshield was not checking the return value of pushModal(), meaning
that it believed it was fully locked when it was not. Later, calling
popModal() would fail, causing an exception and blocking the unlock.
Now when we fail we include an explanatory message, pointing the user
to the actual cause of the issue.

https://bugzilla.gnome.org/show_bug.cgi?id=689106
2013-02-13 17:46:39 +01:00
Giovanni Campagna
2b1a661614 ScreenShield: use a longer animation when locking manually
The curtain animation looks jerky at its current speed, and more so if
we blank the screen immediately at the end. Make it a little slower and
it becomes more confortable.

https://bugzilla.gnome.org/show_bug.cgi?id=691964
2013-02-13 15:14:37 +01:00
Rui Matos
3652002a68 screenShield: Pop modes before starting unlock animation
This way the top panel remains visible while the shield hiding
animation is ongoing instead of suddenly appearing just when it ends.

https://bugzilla.gnome.org/show_bug.cgi?id=692966
2013-02-07 18:25:35 +01:00
Florian Müllner
6bcad45392 screenShield: Use inhibitors to lock screen on suspend
If the screen lock is enabled, lock the screen before suspension.
When using systemd, this will cover both explicitly suspending from
the user menu and suspension initiated by g-s-d (lid close, power
button).

https://bugzilla.gnome.org/show_bug.cgi?id=686482
2013-02-06 01:01:52 +01:00
Florian Müllner
b682c8e052 main: Move KeybindingMode into Shell
Having the definition in C instead of Javascript allows sharing
the corresponding header with gnome-settings-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=643111
2013-02-04 16:48:40 +01:00
Giovanni Campagna
ae0accb5a4 ScreenShield: separate notifications for active and locked
Now that we have an explicit active-but-not-locked state, we should
use different signals to notify changes. lock-status-changed is
renamed to active-changed, and a new locked-changed is introduced.

https://bugzilla.gnome.org/show_bug.cgi?id=693007
2013-02-03 14:59:58 +01:00
Giovanni Campagna
5c4570fcaa ScreenShield: fix regression in GDM greeter
The initial state of the lock screen is HIDDEN, and hideLockScreen
enforces that now, so reflect it in Clutter state too.

https://bugzilla.gnome.org/show_bug.cgi?id=692948
2013-01-31 16:57:38 +01:00
Giovanni Campagna
7ad881d0ec ScreenShield: emit lock-status-changed at the end of animation for manual locking too
gnome-settings-daemon uses lock-status-changed/ActiveChanged to drive
screen blanking, so must wait for the animation end before emitting it.

https://bugzilla.gnome.org/show_bug.cgi?id=691964
2013-01-31 14:10:21 +01:00
Giovanni Campagna
9a25224890 ScreenShield: lower the shield when the user is idle but before locking
In time span between idle and lock the shield should behave like autologin,
but should prevent accidental reactivation (for example when using a touch
screen) by showing the curtain.

https://bugzilla.gnome.org/show_bug.cgi?id=692560
2013-01-31 14:10:20 +01:00
Giovanni Campagna
3f6f597093 ScreenShield: only emit ActiveChanged at the end of the idle fading
gnome-settings-daemon wants to use ActiveChanged to drive screen
blanking policies.
I also added two big comments that should cover all cases, to clear
up what's happening when the idle timers fire.

https://bugzilla.gnome.org/show_bug.cgi?id=691964
2013-01-31 14:07:26 +01:00
Giovanni Campagna
9ab22fe551 ScreenShield: fix fallout from 8cb3884
We must remove music notifications before we're destroyed, otherwise
they get destroyed with us.
Also, integrate a review comment I previously forgot.

https://bugzilla.gnome.org/show_bug.cgi?id=685926
2013-01-31 13:45:57 +01:00
Giovanni Campagna
8cb3884fae ScreenShield: decouple detailed notifications from resident notifications
The designs says that only music notifications should be shown in full
in the screenshield, the others should be either shown as a summary or
with very light details.

https://bugzilla.gnome.org/show_bug.cgi?id=685926
2013-01-31 13:20:08 +01:00
Giovanni Campagna
098bd4509b MessageTray: introduce configurable per-source notification policy
Allow message tray sources to provide a NotificationPolicy object,
that will configure how and if the source is displayed. For notification
daemon sources, this object is hooked to GSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=685926
2013-01-31 13:20:08 +01:00
Matthias Clasen
9281129f07 Really use the right getter
Doh, it is actually a uint, not an int.
2013-01-05 14:21:30 -05:00
Matthias Clasen
0e9ddd3b99 Use the right getter
org.gnome.desktop.screensaver lock-delay is an integer, not
a boolean, so don't use get_bool() on it.

https://bugzilla.gnome.org/show_bug.cgi?id=691170
2013-01-04 22:01:25 -05:00
Giovanni Campagna
a757ce48a1 ScreenShield: don't reset the lock screen animation if it's already happening
When you click Suspend from the user menu, the following things happen:
- we lock the screen internally by calling Main.screenShield.lock() and waiting
  for lock-screen-shown
- logind emits a Lock signal, which causes us to lock again
- gnome-settings-daemon notices PrepareForSleep, and calls org.gnome.ScreenSaver.Lock,
  just in case, so we lock once more
This means that, if you're lucky, you can see the curtain fall down multiple times,
as each .lock() call resets the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=690858
2012-12-30 01:39:24 +01:00
Giovanni Campagna
d525d02348 ScreenShield: honor lock-delay GSettings key
org.gnome.desktop.screensaver.lock-delay contains the grace period
of the screensaver: if deactivated within that many seconds from the
start of the idle period, the shell should not prompt for a password.
This setting correspond to the "Lock screen after" combo in screen
and privacy panels.

https://bugzilla.gnome.org/show_bug.cgi?id=690766
2012-12-27 19:05:44 +01:00
Cosimo Cecchi
4df1222ce7 screen-shield: disconnect from title-changed on destroy
https://bugzilla.gnome.org/show_bug.cgi?id=689820
2012-12-06 19:07:27 -05:00
Giovanni Campagna
4535a70f08 Block cancellation of the unlock dialog when dragging
Pressing esc while the mouse is down should not make the curtain fall,
otherwise a gray screen results.

https://bugzilla.gnome.org/show_bug.cgi?id=686800
2012-11-21 12:35:55 +01:00
Giovanni Campagna
7bed964ab2 ScreenShield: unbreak blurring the background
It was missing a uniform, so it had no effect besides desaturation.

https://bugzilla.gnome.org/show_bug.cgi?id=682536
2012-11-19 20:13:36 +01:00
Florian Müllner
ced7fa9f01 Add screenshield and unlock dialog to ctrl-alt-tab
As we now allow the ctrl-alt-tab popup on the lock screen, it should
be possible to navigate back from the top bar, so add the corresponding
elements to the switcher.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:52:51 +01:00
Florian Müllner
b58f502dd6 main: Add optional keybindingMode parameter to pushModal()
For now we just use it to assign an identifier to modal modes in
which we want to allow some keybindings, but we don't use it for
any actual filtering; we'll start doing this shortly.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:44:22 +01:00
Giovanni Campagna
271508c0a8 ScreenShield: fix code to detect missing unlock dialog
If the session mode has no locking support, screenshield had code to
unlock automatically, but it did so by checking the return value of
the constructor, instead of checking if the constructor was actually
callable, so it would get a TypeError before reaching the check.

https://bugzilla.gnome.org/show_bug.cgi?id=687708
2012-11-11 19:17:58 +01:00
Cosimo Cecchi
b9d50584d8 screenshield: use the correct actor for the background
Commit 4fd690333a added the GLSL snippet to
the background actor, but then discarded the newly created actor.
2012-11-06 17:47:13 -05:00
Giovanni Campagna
e5f7390c09 ScreenShield: hide the cursor while the lock screen is on
While the screen is locked and the cursor is not moved, the mouse
cursor should be hidden, to indicate the machine is idle.

https://bugzilla.gnome.org/show_bug.cgi?id=682535
2012-11-06 23:10:01 +01:00
Giovanni Campagna
797b1ff8bb ScreenShield: account for motion velocity when hiding the lock screen
Switch from a ClutterDragAction to a ClutterGestureAction, that gives
us the velocity of mouse motion at each step, and use it to compute the
animation time for completing the hide gesture.

https://bugzilla.gnome.org/show_bug.cgi?id=682537
2012-11-06 23:04:15 +01:00
Giovanni Campagna
4fd690333a ScreenShield: blur and desaturate the screenshield background
The background is the same as the normal desktop, so we blur and
desaturate it to clearly show that it's not the normal system state.
To do so, we don't use standard ClutterEffects, to avoid the FBO
indirection. Instead, we take advantage of MetaBackgroundActor support
for GLSL code and paint the shaded background texture directly.

https://bugzilla.gnome.org/show_bug.cgi?id=682536
2012-11-06 22:50:10 +01:00
Giovanni Campagna
1c3e7330f3 ScreenShield: don't rely on gnome-session to hide the lightbox
If we lock before the user becomes active again, gnome-session will never
change presence from IDLE, and thus we'll never hide the lightbox.
Instead, install our own idle monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=687020
2012-11-05 22:04:09 +01:00
Rui Matos
b936e60876 screenShield: Tweak curtain animation timings
Rationale:
 - Getting something out of the way should be quick;

 - Very few things in the real world move linearly so, linear
   animations, especially for something as big and visible as this,
   felt too artificial;

 - Moving the curtain out should start slower to make it feel like
   having weight (it fills the whole screen after all) but quickly
   accelerate towards the end to make it snappy too.

https://bugzilla.gnome.org/show_bug.cgi?id=686745
2012-10-26 12:56:17 +02:00
Jasper St. Pierre
4f876995de messageTray: make SummaryItem._closeButton public
Use this to show/hide the close button instead of closeButtonVisible.

https://bugzilla.gnome.org/show_bug.cgi?id=682237
2012-10-25 21:45:18 +02:00
Ray Strode
599f2f43e3 Revert "screenShield: Connect to the actor's show signal instead of using BEFORE_REDRAW"
This reverts commit bdeb7d86b6.

git bz PEBKAC
2012-10-24 10:17:43 -04:00
Tim Lunn
418cf6281e screenShield: explicitly load gnome-screensaver in fallback mode.
When running gnome-shell from lightDM, gnome-screensaver is no
longer auto-loaded. As a result the dbus calls for Lock user etc
will fail.

https://bugzilla.gnome.org/show_bug.cgi?id=683060
Bug-Ubuntu: https://launchpad.net/bugs/1064354
2012-10-22 11:21:18 -04:00
Adel Gadllah
bdeb7d86b6 screenShield: Connect to the actor's show signal instead of using BEFORE_REDRAW
This should make sure that we grab at the right time while at the same time
not break focus handling.

https://bugzilla.gnome.org/show_bug.cgi?id=684650
2012-10-22 11:20:30 -04:00
Giovanni Campagna
2a8a8065a8 ScreenShield: implement o.g.ScreenSaver.GetActiveTime
Part of the old gnome-screensaver interface, returns the number of seconds
that the screensaver has been active for.

https://bugzilla.gnome.org/show_bug.cgi?id=686064
2012-10-18 15:30:40 +02:00
Giovanni Campagna
48fb16b570 ScreenShield: show the unlock dialog on the primary monitor when using the keyboard
Make ModalDialog.open() accept an optional onPrimary argument, and
pass it when the dialog is activated using ESC or Return.

https://bugzilla.gnome.org/show_bug.cgi?id=685855
2012-10-15 22:45:19 +02:00
Giovanni Campagna
5ad7db722d ScreenShield: don't allow cancelling the curtain by pressing esc twice in the dialog
If esc is pressed twice in succession in the unlock dialog, the curtain
is cancelled, but the dialog is cleared after the first esc cancels it,
and it's not destroyed and recreated.

https://bugzilla.gnome.org/show_bug.cgi?id=685441
2012-10-14 18:48:13 +02:00
Jasper St. Pierre
cf0ae8f182 screenShield: Remove erroneous top/bottom padding that may appear
If there are either no resident or persistent notifications, we'll
add some spacing for those boxes that may contain nothing. Make them
invisible to remove the spacing for those elements. It's possible
that we may want to be smarter about this in StBoxLayout to remove
spacing for zero-sized actors, but today is not the day.

https://bugzilla.gnome.org/show_bug.cgi?id=685919
2012-10-11 12:26:00 -03:00
Jasper St. Pierre
955b550e95 screenShield: Add some padding between the clock and notifications box
https://bugzilla.gnome.org/show_bug.cgi?id=685919
2012-10-11 12:26:00 -03:00
Jasper St. Pierre
b3cd46a5c8 screenShield: Align notifications to the left, not the middle
With different lengths of text in notifications, icons aren't
aligned and things look ugly. Put notifications on the left
for now.

https://bugzilla.gnome.org/show_bug.cgi?id=685919
2012-10-11 12:26:00 -03:00
Florian Müllner
0c8a94beb8 screenShield: Fix unlock animation
When unlocking succeeds, the transition back to the user session is
animated. However, commit 8cf9baa1 broke the transition by hiding the
actor before starting the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=684591
2012-09-22 13:50:25 +02:00
Florian Müllner
23c1138a58 screenShield: Fix regression from 114f6f577f 2012-09-19 13:12:01 +02:00
Florian Müllner
114f6f577f screenShield: Delay destruction of unlock dialog
While the unlock dialog is created early so that it appears below
the shield while the curtain slides up, it is destroyed immediately
when the shield slides back in.
Keep it around until the shield is down instead.

https://bugzilla.gnome.org/show_bug.cgi?id=684342
2012-09-19 11:50:57 +02:00
Giovanni Campagna
de93677271 Allow the shell to run without the screenshield
The screenshield requires gdm 3.5, which can be problematic in
jhbuild configurations, or distributions that don't use GDM as the display
manager. Allow transparent fallback to gnome-screensaver in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=683060
2012-09-18 20:25:09 +02:00
Ray Strode
4254fa3d38 ScreenShield: Make Return key dismiss screenshield
A couple of people have walked up to me and asked how to get to the
unlock screen from the screen shield. This was partly addressed by
bug 682285, but all three people who asked me about this said they
tried the return key and were surprised when it didn't work.

It sort of makes sense, since the user is "enter"ing the computer or
"return"ing to it.

This commit makes enter work in addition to the existing escape key.

https://bugzilla.gnome.org/show_bug.cgi?id=683889
2012-09-14 16:28:13 -04:00
Giovanni Campagna
107f5de58e ScreenShield: animate going from the unlock dialog to the lock screen
If the user presses esc in the dialog, tween the lock screen from
the top instead of showing it immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-09-14 17:11:57 +02:00
Giovanni Campagna
be290fafe7 ScreenShield: wait for stage mapping before taking a grab
In gdm, we would attempt to become modal during the synchronous initialization,
and this would fail, as X prevents grabs on unmapped windows. Instead,
wait for the stage to be visible before becoming modal.

https://bugzilla.gnome.org/show_bug.cgi?id=683357
2012-09-14 00:54:50 +02:00
Florian Müllner
2a8625ffae screenShield: Add box-shadow to the shield
According to the mockups, the screen shield should cast a shadow
when lifted.
2012-09-13 19:15:37 +02:00
Giovanni Campagna
8cf9baa132 ScreenShield: move lock status handling to use session mode
Have distinct session modes for the lock screen and the unlock dialog,
and rework the logic in ScreenShield to have the lock-screen mode stack
onto the unlock-dialog mode (where applicable)

https://bugzilla.gnome.org/show_bug.cgi?id=682542
2012-09-10 21:23:25 +02:00
Jasper St. Pierre
43ba93a817 screenShield: Animate the raising of the lock screen with the scroll wheel
A sudden transition to the lock screen is a bit jarring.
2012-09-05 14:51:30 -03:00
Jasper St. Pierre
b37e02c90a screenShield: Fix typo
We aren't French, no matter how much we may want to be.

https://bugzilla.gnome.org/show_bug.cgi?id=683305
2012-09-05 14:28:57 -03:00
Giovanni Campagna
92d8d65543 ScreenShield: use session mode to handle the GDM login dialog
Have main.js call .showDialog() when going back from the lock-screen, instead
of using the return value of createUnlockDialog to know if the dialog
was persistent.
_keepDialog is still used as LoginDialog cannot really be destroyed,
and cancelling it does not destroy it.

https://bugzilla.gnome.org/show_bug.cgi?id=683156
2012-09-04 23:52:41 +02:00
Jasper St. Pierre
cebd8e14e9 screenShield: Zoom out on login
The sudden transition from the lock screen to the user session
may be a bit sudden and overwhelming. Make ourselves more shell-like
by resizing out the screen shield according to mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=683170
2012-09-04 18:42:46 -03:00
Jasper St. Pierre
ca2e09fe8b sessionMode: Allow changing the session mode at runtime
Since we eventually want to add a system for changing the top panel
contents depending on the current state of the shell, let's use the
"session mode" feature for this, and add a mechanism for updating the
session mode at runtime. Add support for every key besides the two
functional keys, and make all the components update automatically when the
session mode is changed. Add a new lock-screen mode, and make the lock
screen change to this when locked.

https://bugzilla.gnome.org/show_bug.cgi?id=683156
2012-09-04 18:42:44 -03:00
Giovanni Campagna
47d46e367e ScreenShield/MessageTray: fix crash after the introduction of close buttons
Commit 5c6b1fd0c modified the hierarchy of SummaryItem contents, by
introducing a notificationStackWidget in place of the StackView, but
forgot to update the bits in ScreenShield.NotificationsBox that accessed
and reparented that directly, causing a crash by invalid theme node access.

https://bugzilla.gnome.org/show_bug.cgi?id=682683
2012-09-03 23:08:36 +02:00
Giovanni Campagna
f177bd0b51 ScreenShield: Allow lifting up the curtain with the mouse wheel
On a traditional mouse, or with edge-scrolling on a touchpad, it just
feels natural to unlock by scrolling up.

https://bugzilla.gnome.org/show_bug.cgi?id=683164
2012-09-03 17:19:40 +02:00
Giovanni Campagna
a76cc79f88 ScreenShield: add a drop shadow to the animated arrows
Introduce a StShadowHelper to manage drop shadows from JS (which
cannot use Cogl directly), and use it in a new StWidget-derived
JS class to draw the arrow.

https://bugzilla.gnome.org/show_bug.cgi?id=682285
2012-09-01 16:38:51 +02:00
Giovanni Campagna
1a6d74fcb2 ScreenShield: rework the arrow in the lock screen
User testing has shown that it is not discoverable that the whole
lock screen can be dragged. A new mockup includes more arrows
and a short animation every 4 seconds.

https://bugzilla.gnome.org/show_bug.cgi?id=682285
2012-09-01 16:38:51 +02:00
Giovanni Campagna
9dafaa2c0c ScreenShield: don't bump the lock screen while animating
Bumping overrides any animation, and causes the installed onComplete
not to run, which in turn breaks suspending from the user menu (as
it listens to lock-screen-shown).
Add a state variable (using an enumeration shared with messageTray)
to control the lock screen, and only bump when the lock is still.

https://bugzilla.gnome.org/show_bug.cgi?id=682746
2012-08-26 23:43:14 +02:00
Giovanni Campagna
bec48492ab ScreenShield: hide Removable devices in the lock screen
Showing the removable devices is potentially a security risk (as
they include network shares). Also, a nautilus launched from there
can't be used, so it's just a way to overload the system.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-26 14:30:45 +02:00
Giovanni Campagna
9a7914eee9 Consolidate systemd and consolekit in a common abstract class
Various code around had different paths for ConsoleKit and
logind. Consolidate it by making an abstract class that all
callers can use, which hides the implementation details of the
two daemons.

https://bugzilla.gnome.org/show_bug.cgi?id=682096
2012-08-18 18:09:55 +02:00
Jasper St. Pierre
5991c8dca3 messageTray: Hook SourceActor up to source icon changes automatically
Instead of manually tracking source icon changes, or requiring a manual
call to _setSummaryIcon, add a way to emit a signal when we're guaranteed
the icon has been changed, and then the source actor will automatically
update the icon.
_setSummaryIcon is still available for sources such as the notification
daemon, that require special treatment for the summary icon (to be used
with tray icons)

https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-08-18 00:36:13 +02:00
Florian Müllner
b9226fbcbd screenShield: Add missing import 2012-08-17 19:31:03 +02:00
Giovanni Campagna
b6375d3e40 ScreenShield: listen to login managers to unlock the session
Handle locking and unlocking from outside. This fixes coming
back from fast user switching.

https://bugzilla.gnome.org/show_bug.cgi?id=682096
2012-08-17 19:10:27 +02:00
Giovanni Campagna
8dc9ceb2bc ScreenShield: make .lock() and .unlock() idempotent
Those methods can be called multiple times in certain situations,
and will be even more so after hooking them to the system bus.
2012-08-17 19:10:27 +02:00
Giovanni Campagna
a5f2d289bd ScreenShield: reduce curtain sliding time to 0.5 seconds
Current time is too long, 0.5 was proved to be more effective
in user testing.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-17 01:32:02 +02:00
Giovanni Campagna
f8b1a84b81 ScreenShield: Fix updating visibility of the notification box
If there were no persistent or resident notification sources,
nothing ever would call _updateVisibility, and the box would stay
there empty

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-16 23:18:02 +02:00
Giovanni Campagna
b53d18fe1c ScreenShield: constrain vertical movement of the screen lock
Don't allow dragging the screen lock above and below the screen,
as in particular dragging below breaks the illusion of the curtain.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-16 23:18:02 +02:00
Giovanni Campagna
d0a94768a6 ScreenShield: bump the lock screen slightly when pressing a key
When pressing a key different from escape (one thus that has no
effect), bump the screen up, to indicate that it eats keyboard
input and it must be lifted up.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-16 23:18:02 +02:00
Giovanni Campagna
2b30afa618 ScreenShield: place the lock screen contents only on the primary monitor
Use the new monitor constraint to place the clock and notification
box on the primary monitor only. The background is still extended
to the whole screen.
Get rid of the LockDialogGroup hack, now that ClutterBinLayout
respects fixed position correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=681743
2012-08-16 21:46:04 +02:00
Giovanni Campagna
b3b847fadd ScreenShield: fix regression from 2c627cad
A method was renamed but one call site was forgotten.
2012-08-16 19:35:23 +02:00
Giovanni Campagna
2c627cad10 ScreenShield: prepare the dialog when the user starts dragging
This way if the user drags long enough it will see the dialog
below the curtain, and it will appear as it was always there.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-13 17:59:19 +02:00
Giovanni Campagna
d7f54213f1 ScreenShield: when explicitly locking, tween the shield from the top
The curtain should appear to be an overlay on top of the system,
and since it is lifted by dragging up, it makes sense to slide it
down on lock.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-07 21:26:17 +02:00
Giovanni Campagna
aa733b5e53 Only show new notifications in the screen shield
Rework the count system in Source, to distinguish between the
normal notification count and the count of unseen/unacknowledged
notification. (A notification is considered unacknowledged until
shown, as a banner or inside the summary box pointer).
Includes some code cleanups and a test for multiple notifications
in the same source.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-07 18:10:49 +02:00
Giovanni Campagna
8d7fa54af4 ScreenShield: fix spacing of notifications and sources
Reduce padding around persistent sources, and ensure that spacing
around resident notifications is only applied once.
Also, add some padding to the clock.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-06 23:02:34 +02:00
Giovanni Campagna
59cd9b4220 ScreenSheild: make notification view scrollable
Place a maximum height on the notification view, and show scrollbars
if the list of persistent sources would overflow.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-06 23:02:34 +02:00
Giovanni Campagna
59dfb5866d ScreenShield: update the displayed title when the source changes
Notifications in the lock screen need to watch signals on source
and react accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-06 23:02:31 +02:00
Giovanni Campagna
a29ceaa8ec ScreenShield: lower the autodrag threshold to 10%
The threshold is there just to ensure that the user is opening
the curtain on purpose. Requiring 40% is too much for that.

https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-06 21:43:54 +02:00
Giovanni Campagna
0e4171a87c Screen Shield: animate manual locking
When the screen shield is activated from the user menu, animate
it instead of showing it abruptly. Also, ensure that the animation
had time to finish before calling UPower to suspend, to avoid
showing it when resuming.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
22eea750f3 ScreenShield: show notifications in the locked screen
Track screen lock status in the message tray, and filter banner
notifications. The message tray is completely hidden when the screen is
locked, but exceptions can be made for individual transient notifications,
such as shell messages and the on screen keyboard.
Non transient sources are shown in the middle of the lock screen. Resident
notifications (such as those from Rhythmbox) are shown in full, while
persistent ones are displayed as icon and message count.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
904ceba6b2 Add a clock to the lock screen
Start implementing the lock screen design by adding a big white
clock in the middle.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
a28d639c3b Consolidate creation of login and unlock dialog in the screenshield
The design calls for the curtain to appear in the gdm greeter too.
Implement this by having the screenshield manage the login dialog
(delegating its creation to SessionMode).

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
c0652bcd8f ScreenShield: implement curtain design
This separates the screen shield into two main screens. One is
the lock screen, and it is shown when coming back from idle status
and when failing authentication. The other is the actual unlock
dialog.
Moving from the first to the second is possible by pressing Escape
or by dragging an arrow on the bottom on the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
54dc0fd123 ScreenShield: use LayoutManager for creating the actor
This ensures that the screen shield is created at the right
stacking level, so the message tray is visible in the lock screen
(showing PAM messages, critical notifications and the on screen
keyboard)

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
c22a00afee ScreenShield: improve locking/modal policy
Ensure that the lightbox is above everything (including the screenlock
itself) when fading in - this allows for fading while showing the
unlock dialog. Also, don't pushModal again when already locked, or
we won't get out of it.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Giovanni Campagna
2c3ec7846f Add UnlockDialog for unlocking the screen shield
When the screenshield is deactivated, instead of going back to the
session immediately, prompt the user for authentication.
This essentially reinstates what used to be provided by gnome-screensaver.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Marina Zhurakhinskaya
4e6fa56c87 screenShield: add initial functionality
We are replacing the gnome-screensaver module with with a screen shield
that is part of gnome-shell.

This patch fades out the screen on idle and shows a shield with a background
image when there is activity again. The shield can be removed with a key or
button press.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00