Make Escape key close More... modes before closing overlay entirely
This matches what I'd expect at least.
This commit is contained in:
parent
3066f60efc
commit
8b1f732228
@ -146,11 +146,18 @@ Sideshow.prototype = {
|
|||||||
this._searchEntry.connect('key-press-event', function (se, e) {
|
this._searchEntry.connect('key-press-event', function (se, e) {
|
||||||
let symbol = Shell.get_event_key_symbol(e);
|
let symbol = Shell.get_event_key_symbol(e);
|
||||||
if (symbol == Clutter.Escape) {
|
if (symbol == Clutter.Escape) {
|
||||||
// A single escape clears the entry, two of them hides the overlay
|
// Escape will keep clearing things back to the desktop. First, if
|
||||||
if (me._searchEntry.text == '')
|
// we have active text, we remove it.
|
||||||
me.emit('activated');
|
if (me._searchEntry.text != '')
|
||||||
else
|
|
||||||
me._searchEntry.text = '';
|
me._searchEntry.text = '';
|
||||||
|
// Next, if we're in one of the "more" modes, close it
|
||||||
|
else if (me._moreAppsMode)
|
||||||
|
me._unsetMoreAppsMode();
|
||||||
|
else if (me._moreDocsMode)
|
||||||
|
me._unsetMoreDocsMode();
|
||||||
|
else
|
||||||
|
// Finally, just close the overlay entirely
|
||||||
|
me.emit('activated');
|
||||||
return true;
|
return true;
|
||||||
} else if (symbol == Clutter.Up) {
|
} else if (symbol == Clutter.Up) {
|
||||||
// selectUp and selectDown wrap around in their respective displays
|
// selectUp and selectDown wrap around in their respective displays
|
||||||
|
Loading…
Reference in New Issue
Block a user