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
This commit is contained in:
parent
797b1ff8bb
commit
e5f7390c09
@ -704,6 +704,8 @@ const ScreenShield = new Lang.Class({
|
||||
this._lockScreenGroup.hide();
|
||||
}
|
||||
|
||||
global.stage.show_cursor();
|
||||
|
||||
if (Main.sessionMode.currentMode == 'lock-screen')
|
||||
Main.sessionMode.popMode('lock-screen');
|
||||
},
|
||||
@ -792,6 +794,16 @@ const ScreenShield = new Lang.Class({
|
||||
this._arrowAnimationId = Mainloop.timeout_add(6000, Lang.bind(this, this._animateArrows));
|
||||
this._animateArrows();
|
||||
|
||||
let motionId = global.stage.connect('captured-event', function(stage, event) {
|
||||
if (event.type() == Clutter.EventType.MOTION) {
|
||||
global.stage.show_cursor();
|
||||
global.stage.disconnect(motionId);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
global.stage.hide_cursor();
|
||||
|
||||
this._lockScreenState = MessageTray.State.SHOWN;
|
||||
this._lockScreenGroup.fixed_position_set = false;
|
||||
this._lockScreenScrollCounter = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user