[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
This commit is contained in:
parent
0e40782723
commit
d96d07af10
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user