ScreenShield: when the user goes idle, check for active before pushing a modal
We can't assume "isActive implies isModal", so there is a risk of pushing a modal that nothing else will ever pop, because we take the early return and don't activate the user active watch. https://bugzilla.gnome.org/show_bug.cgi?id=700901
This commit is contained in:
parent
502a9aefdc
commit
d509ab7779
@ -764,19 +764,6 @@ const ScreenShield = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this._becomeModal()) {
|
|
||||||
// We could not become modal, so we can't activate the
|
|
||||||
// screenshield. The user is probably very upset at this
|
|
||||||
// point, but any application using global grabs is broken
|
|
||||||
// Just tell him to stop using this app
|
|
||||||
//
|
|
||||||
// XXX: another option is to kick the user into the gdm login
|
|
||||||
// screen, where we're not affected by grabs
|
|
||||||
Main.notifyError(_("Unable to lock"),
|
|
||||||
_("Lock was blocked by an application"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._lightbox.actor.visible ||
|
if (this._lightbox.actor.visible ||
|
||||||
this._isActive) {
|
this._isActive) {
|
||||||
// We're either shown and active, or in the process of
|
// We're either shown and active, or in the process of
|
||||||
@ -790,6 +777,19 @@ const ScreenShield = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this._becomeModal()) {
|
||||||
|
// We could not become modal, so we can't activate the
|
||||||
|
// screenshield. The user is probably very upset at this
|
||||||
|
// point, but any application using global grabs is broken
|
||||||
|
// Just tell him to stop using this app
|
||||||
|
//
|
||||||
|
// XXX: another option is to kick the user into the gdm login
|
||||||
|
// screen, where we're not affected by grabs
|
||||||
|
Main.notifyError(_("Unable to lock"),
|
||||||
|
_("Lock was blocked by an application"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._lightbox.show();
|
this._lightbox.show();
|
||||||
|
|
||||||
if (this._activationTime == 0)
|
if (this._activationTime == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user