Merge lp:~bregma/unity/lp-1066157-trusty into lp:unity/7.2

Proposed by Stephen M. Webb on 2015-03-11
Status: Merged
Approved by: Christopher Townsend on 2015-03-12
Approved revision: 3810
Merged at revision: 3814
Proposed branch: lp:~bregma/unity/lp-1066157-trusty
Merge into: lp:unity/7.2
Diff against target: 243 lines (+71/-47)
7 files modified
plugins/unityshell/src/nux-area-accessible.cpp (+15/-0)
plugins/unityshell/src/nux-layout-accessible.cpp (+2/-0)
plugins/unityshell/src/nux-view-accessible.cpp (+6/-0)
plugins/unityshell/src/unity-root-accessible.cpp (+1/-45)
plugins/unityshell/src/unity-util-accessible.cpp (+44/-0)
plugins/unityshell/src/unity-util-accessible.h (+1/-0)
plugins/unityshell/src/unityshell.cpp (+2/-2)
To merge this branch: bzr merge lp:~bregma/unity/lp-1066157-trusty
Reviewer Review Type Date Requested Status
Christopher Townsend 2015-03-11 Approve on 2015-03-12
Review via email: mp+252657@code.launchpad.net

Commit message

extended accessible exploration of the Dash dynamic content

Description of the change

Enable the use of Orca to navigate around the Dash every tim ethe Dash is opened.

Cherry-picked from Unity trunk.

To post a comment you must log in.
Christopher Townsend (townsend) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/nux-area-accessible.cpp'
2--- plugins/unityshell/src/nux-area-accessible.cpp 2013-01-09 18:09:10 +0000
3+++ plugins/unityshell/src/nux-area-accessible.cpp 2015-03-11 20:45:16 +0000
4@@ -88,6 +88,8 @@
5 AtkObject* accessible);
6 static void on_parent_window_activate_cb(AtkObject* parent_window,
7 NuxAreaAccessible* self);
8+static void on_parent_window_deactivate_cb(AtkObject* parent_window,
9+ NuxAreaAccessible* self);
10 static AtkObject* search_for_parent_window(AtkObject* object);
11 static gboolean nux_area_accessible_real_check_pending_notification(NuxAreaAccessible* self);
12 static void check_parent_window_connected(NuxAreaAccessible* self);
13@@ -427,6 +429,10 @@
14 "activate",
15 G_CALLBACK(on_parent_window_activate_cb),
16 self);
17+ g_signal_connect(self->priv->parent_window,
18+ "deactivate",
19+ G_CALLBACK(on_parent_window_deactivate_cb),
20+ self);
21 }
22 }
23
24@@ -485,6 +491,15 @@
25 nux_area_accessible_check_pending_notification(self);
26 }
27
28+static void
29+on_parent_window_deactivate_cb(AtkObject* parent_window,
30+ NuxAreaAccessible* self)
31+{
32+ g_return_if_fail(NUX_IS_AREA_ACCESSIBLE(self));
33+
34+ self->priv->focused = FALSE;
35+}
36+
37
38 /*
39 * nux_area_check_pending_notification:
40
41=== modified file 'plugins/unityshell/src/nux-layout-accessible.cpp'
42--- plugins/unityshell/src/nux-layout-accessible.cpp 2014-02-19 04:15:22 +0000
43+++ plugins/unityshell/src/nux-layout-accessible.cpp 2015-03-11 20:45:16 +0000
44@@ -29,6 +29,7 @@
45 */
46
47 #include "nux-layout-accessible.h"
48+#include "unity-util-accessible.h"
49
50 #include "unitya11y.h"
51
52@@ -185,6 +186,7 @@
53 {
54 signal_name = "children-changed::add";
55 index = nux_layout_accessible_get_n_children(accessible) - 1;
56+ explore_children(accessible);
57 }
58 else
59 {
60
61=== modified file 'plugins/unityshell/src/nux-view-accessible.cpp'
62--- plugins/unityshell/src/nux-view-accessible.cpp 2012-07-09 20:33:59 +0000
63+++ plugins/unityshell/src/nux-view-accessible.cpp 2015-03-11 20:45:16 +0000
64@@ -28,6 +28,7 @@
65 */
66
67 #include "nux-view-accessible.h"
68+#include "unity-util-accessible.h"
69 #include "unitya11y.h"
70 #include "nux-base-window-accessible.h"
71
72@@ -241,9 +242,14 @@
73 atk_child = unity_a11y_get_accessible(layout);
74
75 if (is_add)
76+ {
77 signal_name = "children-changed::add";
78+ explore_children(accessible);
79+ }
80 else
81+ {
82 signal_name = "children-changed::remove";
83+ }
84
85 /* index is always 0 as there is always just one layout */
86 g_signal_emit_by_name(accessible, signal_name, 0, atk_child, NULL);
87
88=== modified file 'plugins/unityshell/src/unity-root-accessible.cpp'
89--- plugins/unityshell/src/unity-root-accessible.cpp 2012-10-15 12:48:26 +0000
90+++ plugins/unityshell/src/unity-root-accessible.cpp 2015-03-11 20:45:16 +0000
91@@ -27,6 +27,7 @@
92 */
93
94 #include "unity-root-accessible.h"
95+#include "unity-util-accessible.h"
96 #include "nux-base-window-accessible.h"
97 #include "unitya11y.h"
98
99@@ -48,7 +49,6 @@
100 gint i);
101 static AtkObject* unity_root_accessible_get_parent(AtkObject* obj);
102 /* private */
103-static void explore_children(AtkObject* obj);
104 static void check_active_window(UnityRootAccessible* self);
105 static void register_interesting_messages(UnityRootAccessible* self);
106 static void add_window(UnityRootAccessible* self,
107@@ -182,50 +182,6 @@
108
109 /* private */
110 /*
111- * FIXME: temporal solution
112- *
113- * Normally not all the accessible objects on the hierarchy are
114- * available from the beginning, and they are being created by demand
115- * due the request on the AT (ie: orca) side
116- *
117- * It usually follows a top-down approach. Top objects emits a signal
118- * of interest, so AT apps get interest on it, and request their
119- * children. One example is the signal "window::activate". AT receives
120- * a signal meaning that a top level object is activated, so request
121- * their children (and gran-children).
122- *
123- * Due technical reasons, right now it is hard to find a suitable way
124- * to emit the signal "activate" on the BaseWindow. That means that
125- * objects on the bottom of the hierarchy are not created, so Orca
126- * doesn't react to changes on sections like the Launcher.
127- *
128- * So in order to prevent that, we make a manual exploration of the
129- * hierarchy in order to ensure that those objects are there.
130- *
131- * NOTE: this manual exploration is not required with at-spi2, just
132- * with at-spi.
133- *
134- */
135-static void
136-explore_children(AtkObject* obj)
137-{
138- gint num = 0;
139- gint i = 0;
140- AtkObject* atk_child = NULL;
141-
142- g_return_if_fail(ATK_IS_OBJECT(obj));
143-
144- num = atk_object_get_n_accessible_children(obj);
145-
146- for (i = 0; i < num; i++)
147- {
148- atk_child = atk_object_ref_accessible_child(obj, i);
149- explore_children(atk_child);
150- g_object_unref(atk_child);
151- }
152-}
153-
154-/*
155 * Call all the children (NuxBaseWindowAccessible) to check if they
156 * are in the proper active or deactive status.
157 */
158
159=== modified file 'plugins/unityshell/src/unity-util-accessible.cpp'
160--- plugins/unityshell/src/unity-util-accessible.cpp 2013-02-21 12:01:36 +0000
161+++ plugins/unityshell/src/unity-util-accessible.cpp 2015-03-11 20:45:16 +0000
162@@ -447,3 +447,47 @@
163 {
164 unity_window_thread = wt;
165 }
166+
167+/*
168+ * FIXME: temporal solution
169+ *
170+ * Normally not all the accessible objects on the hierarchy are
171+ * available from the beginning, and they are being created by demand
172+ * due the request on the AT (ie: orca) side
173+ *
174+ * It usually follows a top-down approach. Top objects emits a signal
175+ * of interest, so AT apps get interest on it, and request their
176+ * children. One example is the signal "window::activate". AT receives
177+ * a signal meaning that a top level object is activated, so request
178+ * their children (and gran-children).
179+ *
180+ * Due technical reasons, right now it is hard to find a suitable way
181+ * to emit the signal "activate" on the BaseWindow. That means that
182+ * objects on the bottom of the hierarchy are not created, so Orca
183+ * doesn't react to changes on sections like the Launcher.
184+ *
185+ * So in order to prevent that, we make a manual exploration of the
186+ * hierarchy in order to ensure that those objects are there.
187+ *
188+ * NOTE: this manual exploration is not required with at-spi2, just
189+ * with at-spi.
190+ *
191+ */
192+void
193+explore_children(AtkObject* obj)
194+{
195+ gint num = 0;
196+ gint i = 0;
197+ AtkObject* atk_child = NULL;
198+
199+ g_return_if_fail(ATK_IS_OBJECT(obj));
200+
201+ num = atk_object_get_n_accessible_children(obj);
202+
203+ for (i = 0; i < num; i++)
204+ {
205+ atk_child = atk_object_ref_accessible_child(obj, i);
206+ explore_children(atk_child);
207+ g_object_unref(atk_child);
208+ }
209+}
210
211=== modified file 'plugins/unityshell/src/unity-util-accessible.h'
212--- plugins/unityshell/src/unity-util-accessible.h 2011-09-12 16:51:28 +0000
213+++ plugins/unityshell/src/unity-util-accessible.h 2015-03-11 20:45:16 +0000
214@@ -53,6 +53,7 @@
215 GType unity_util_accessible_get_type(void);
216
217 void unity_util_accessible_set_window_thread(nux::WindowThread* wt);
218+void explore_children(AtkObject* obj);
219
220 G_END_DECLS
221
222
223=== modified file 'plugins/unityshell/src/unityshell.cpp'
224--- plugins/unityshell/src/unityshell.cpp 2014-12-16 19:27:36 +0000
225+++ plugins/unityshell/src/unityshell.cpp 2015-03-11 20:45:16 +0000
226@@ -269,8 +269,6 @@
227 {
228 notify_init("unityshell");
229
230- unity_a11y_preset_environment();
231-
232 XSetErrorHandler(old_handler);
233
234 /* Wrap compiz interfaces */
235@@ -4525,6 +4523,8 @@
236 if (!CompPlugin::checkPluginABI("opengl", COMPIZ_OPENGL_ABI))
237 return false;
238
239+ unity_a11y_preset_environment();
240+
241 /*
242 * GTK needs to be initialized or else unity's gdk/gtk calls will crash.
243 * This is already done in compiz' main() if using ubuntu packages, but not

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: