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
This commit is contained in:
Giovanni Campagna
2012-10-14 18:34:22 +02:00
parent f94369dd6e
commit 48fb16b570
3 changed files with 17 additions and 10 deletions

View File

@ -43,6 +43,8 @@ const MonitorConstraint = new Lang.Class({
},
set primary(v) {
if (v)
this._index = -1;
this._primary = v;
if (this.actor)
this.actor.queue_relayout();
@ -54,6 +56,7 @@ const MonitorConstraint = new Lang.Class({
},
set index(v) {
this._primary = false;
this._index = v;
if (this.actor)
this.actor.queue_relayout();