Add tooltip delay to the preview pop-ups.
Showing previews after a delay allows the user to move the mouse around the screen without triggering constant pop-ups. Make sure we remove the pop-up when the user hits Escape and redisplay the pop-up if we are updating the section results due to a change in space allocated for it. Rename protected variable _hasPreview to _showPreview in order to not have the naming conflict with a new private variable _havePointer, which we name in first person.
This commit is contained in:
@@ -146,6 +146,11 @@ Sideshow.prototype = {
|
||||
this._searchEntry.connect('key-press-event', function (se, e) {
|
||||
let symbol = Shell.get_event_key_symbol(e);
|
||||
if (symbol == Clutter.Escape) {
|
||||
// We always want to hide the previews when the user hits Escape.
|
||||
// If something that should have a preview gets displayed under
|
||||
// the mouse pointer afterwards the preview will get redisplayed.
|
||||
me._appDisplay.hidePreview();
|
||||
me._docDisplay.hidePreview();
|
||||
// Escape will keep clearing things back to the desktop. First, if
|
||||
// we have active text, we remove it.
|
||||
if (me._searchEntry.text != '')
|
||||
|
Reference in New Issue
Block a user