[gnome-shell] viewSelector: Synthesize a new event with correct source for search
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] viewSelector: Synthesize a new event with correct source for search
- Date: Wed, 9 Jul 2014 10:26:31 +0000 (UTC)
commit a583f45cc64391fe4c7562047020c8d445010e59
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Jul 9 12:06:40 2014 +0200
viewSelector: Synthesize a new event with correct source for search
We currently replay events that should start a search to the search
entry, which is fairly dodgy. Synthesize a new event with the correct
source actor instead, which is a bit less evil.
js/ui/viewSelector.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 918cd87..b743fa7 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -508,7 +508,10 @@ const ViewSelector = new Lang.Class({
startSearch: function(event) {
global.stage.set_key_focus(this._text);
- this._text.event(event, true);
+
+ let synthEvent = event.copy();
+ synthEvent.set_source(this._text);
+ this._text.event(synthEvent, true);
},
// the entry does not show the hint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]