[gnome-shell/wip/carlosg/no-event-source: 18/21] searchController: Avoid event.set_source() API
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/no-event-source: 18/21] searchController: Avoid event.set_source() API
- Date: Fri, 25 Feb 2022 16:10:17 +0000 (UTC)
commit 908ad8fa2ef1f15dc94e20eb1c26b035ff051990
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Feb 25 13:10:53 2022 +0100
searchController: Avoid event.set_source() API
It does not make sense that the target actor is both destinatary
and content of the events being sent, so this API call is going away.
Since the event can be sent entirely unmodified (more so, it will
become immutable/readonly in the future), avoid creating a copy
since it does not matter sending one or other struct.
js/ui/searchController.js | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/js/ui/searchController.js b/js/ui/searchController.js
index 6105e976b6..6154f657cf 100644
--- a/js/ui/searchController.js
+++ b/js/ui/searchController.js
@@ -228,10 +228,7 @@ var SearchController = GObject.registerClass({
startSearch(event) {
global.stage.set_key_focus(this._text);
-
- let synthEvent = event.copy();
- synthEvent.set_source(this._text);
- this._text.event(synthEvent, false);
+ this._text.event(event, false);
}
// the entry does not show the hint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]