Change keyboard handling API to handle nested modal calls

Rename beginModal/endModal to pushModal/popModal.  All of the current callers
just want to ensure that we're in a modal state; they don't actually need to
fail if we already are.

These functions also now take the Clutter keyboard focus, while recording
the previous focus.

https://bugzilla.gnome.org/show_bug.cgi?id=595116
This commit is contained in:
Colin Walters
2009-09-15 15:53:07 -04:00
parent 2ddc7cf00f
commit 8a2bfd0e55
4 changed files with 87 additions and 31 deletions

View File

@ -277,8 +277,7 @@ Overview.prototype = {
show : function() {
if (this.visible)
return;
if (!Main.beginModal())
return;
Main.pushModal(this._dash.actor);
this.visible = true;
this.animationInProgress = true;
@ -437,7 +436,7 @@ Overview.prototype = {
this._coverPane.lower_bottom();
Main.endModal();
Main.popModal(this._dash.actor);
this.emit('hidden');
},