From d96d07af10024c7d3bff627fb86d1f69278d6c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 18 May 2010 23:56:52 +0200 Subject: [PATCH] [searchEntry] Correct some erroneous hover states As the search entry captures the pointer when activated, the hover state is not updated properly when the activation is cancelled (either by clicking outside the entry or by hitting Escape). Update the state manually in these cases. https://bugzilla.gnome.org/show_bug.cgi?id=611095 --- js/ui/dash.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/ui/dash.js b/js/ui/dash.js index 4290fd378..e944f90d6 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -230,6 +230,14 @@ SearchEntry.prototype = { }, reset: function () { + let [x, y, mask] = global.get_pointer(); + let actor = global.stage.get_actor_at_pos (Clutter.PickMode.REACTIVE, + x, y); + // this.actor is never hovered directly, only its clutter_text and icon + let hovered = this.actor == actor.get_parent(); + + this.actor.set_hover(hovered); + this.entry.text = ''; global.stage.set_key_focus(null); this.entry.set_cursor_visible(true);