[gnome-shell] [searchEntry] Correct some erroneous hover states



commit d96d07af10024c7d3bff627fb86d1f69278d6c3f
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue May 18 23:56:52 2010 +0200

    [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 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 4290fd3..e944f90 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]