|
|
f3cbb9 |
From 80c3466bf9752567f557b4db2fe41d5b72e2c257 Mon Sep 17 00:00:00 2001
|
|
|
580c05 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
580c05 |
Date: Tue, 15 Sep 2015 14:04:07 -0400
|
|
|
580c05 |
Subject: [PATCH] magnifier: don't spew to console when focus moves around
|
|
|
580c05 |
|
|
|
580c05 |
We currently ship at-spi2 2.8 in 7.2 but gnome-shell 3.14 which
|
|
|
580c05 |
depends on function names shipped in later versions of at-spi2.
|
|
|
580c05 |
|
|
|
580c05 |
This commit works around the problem by using the names of the functions,
|
|
|
580c05 |
as they existed in 2.8.
|
|
|
580c05 |
---
|
|
|
f3cbb9 |
js/ui/magnifier.js | 16 ++++++++++++++--
|
|
|
f3cbb9 |
1 file changed, 14 insertions(+), 2 deletions(-)
|
|
|
580c05 |
|
|
|
580c05 |
diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js
|
|
|
f3cbb9 |
index 6438c64c3..6312524e3 100644
|
|
|
580c05 |
--- a/js/ui/magnifier.js
|
|
|
580c05 |
+++ b/js/ui/magnifier.js
|
|
|
f3cbb9 |
@@ -724,7 +724,13 @@ const ZoomRegion = new Lang.Class({
|
|
|
580c05 |
},
|
|
|
580c05 |
|
|
|
580c05 |
_updateFocus: function(caller, event) {
|
|
|
580c05 |
- let component = event.source.get_component_iface();
|
|
|
580c05 |
+ let component;
|
|
|
580c05 |
+
|
|
|
f3cbb9 |
+ if (typeof event.source.get_component_iface === 'function')
|
|
|
580c05 |
+ component = event.source.get_component_iface();
|
|
|
f3cbb9 |
+ else if (typeof event.source.get_component === 'function')
|
|
|
580c05 |
+ component = event.source.get_component();
|
|
|
580c05 |
+
|
|
|
580c05 |
if (!component || event.detail1 != 1)
|
|
|
580c05 |
return;
|
|
|
580c05 |
let extents;
|
|
|
f3cbb9 |
@@ -741,7 +747,13 @@ const ZoomRegion = new Lang.Class({
|
|
|
580c05 |
},
|
|
|
580c05 |
|
|
|
580c05 |
_updateCaret: function(caller, event) {
|
|
|
580c05 |
- let text = event.source.get_text_iface();
|
|
|
580c05 |
+ let text;
|
|
|
580c05 |
+
|
|
|
f3cbb9 |
+ if (typeof event.source.get_text_iface === 'function')
|
|
|
580c05 |
+ text = event.source.get_text_iface();
|
|
|
f3cbb9 |
+ else if (typeof event.source.get_text === 'function')
|
|
|
580c05 |
+ text = event.source.get_text();
|
|
|
f3cbb9 |
+
|
|
|
580c05 |
if (!text)
|
|
|
580c05 |
return;
|
|
|
580c05 |
let extents;
|
|
|
580c05 |
--
|
|
|
f3cbb9 |
2.12.0
|
|
|
580c05 |
|