Merge lp:~vanvugt/mir/no-delegate into lp:mir
- no-delegate
- Merge into development-branch
Status: | Merged |
---|---|
Approved by: | Daniel van Vugt |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2442 |
Proposed branch: | lp:~vanvugt/mir/no-delegate |
Merge into: | lp:mir |
Diff against target: |
368 lines (+48/-53) 20 files modified
benchmarks/frame-uniformity/touch_measuring_client.cpp (+1/-2) debian/changelog (+2/-0) examples/demo_client_display_config.c (+1/-2) examples/eglapp.c (+1/-6) examples/eglsquare.cpp (+1/-2) examples/fingerpaint.c (+2/-3) include/client/mir_toolkit/client_types.h (+0/-11) include/client/mir_toolkit/mir_surface.h (+4/-2) src/client/mir_surface_api.cpp (+21/-2) src/client/symbols.map (+2/-1) src/server/graphics/nested/host_connection.h (+2/-1) src/server/graphics/nested/mir_client_host_connection.cpp (+2/-2) src/server/graphics/nested/nested_output.cpp (+1/-2) tests/acceptance-tests/test_client_focus_notification.cpp (+1/-6) tests/acceptance-tests/test_client_input.cpp (+1/-2) tests/acceptance-tests/test_client_surface_events.cpp (+2/-3) tests/acceptance-tests/test_client_surface_visibility.cpp (+1/-2) tests/acceptance-tests/throwback/test_client_input.cpp (+1/-2) tests/include/mir_test_doubles/stub_host_connection.h (+1/-1) tests/unit-tests/graphics/nested/test_nested_display_buffer.cpp (+1/-1) |
To merge this branch: | bzr merge lp:~vanvugt/mir/no-delegate |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Kevin DuBois (community) | Approve | ||
Alan Griffiths | Approve | ||
Review via email: mp+254541@code.launchpad.net |
Commit message
Deprecate MirEventDelegate. This makes the client API slightly more pleasant to use.
Binary ABI compatibility with the old form is also retained.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2434
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'benchmarks/frame-uniformity/touch_measuring_client.cpp' | |||
2 | --- benchmarks/frame-uniformity/touch_measuring_client.cpp 2015-03-30 03:20:27 +0000 | |||
3 | +++ benchmarks/frame-uniformity/touch_measuring_client.cpp 2015-03-31 02:56:11 +0000 | |||
4 | @@ -64,8 +64,7 @@ | |||
5 | 64 | 64 | ||
6 | 65 | void collect_input_and_frame_timing(MirSurface *surface, mt::Barrier& client_ready, std::chrono::high_resolution_clock::duration duration, std::shared_ptr<TouchSamples> const& results) | 65 | void collect_input_and_frame_timing(MirSurface *surface, mt::Barrier& client_ready, std::chrono::high_resolution_clock::duration duration, std::shared_ptr<TouchSamples> const& results) |
7 | 66 | { | 66 | { |
10 | 67 | MirEventDelegate event_handler = { input_callback, results.get() }; | 67 | mir_surface_set_event_handler(surface, input_callback, results.get()); |
9 | 68 | mir_surface_set_event_handler(surface, &event_handler); | ||
11 | 69 | 68 | ||
12 | 70 | client_ready.ready(); | 69 | client_ready.ready(); |
13 | 71 | 70 | ||
14 | 72 | 71 | ||
15 | === modified file 'debian/changelog' | |||
16 | --- debian/changelog 2015-03-30 03:20:27 +0000 | |||
17 | +++ debian/changelog 2015-03-31 02:56:11 +0000 | |||
18 | @@ -22,6 +22,8 @@ | |||
19 | 22 | . Added support and example code for rendering window title strings. | 22 | . Added support and example code for rendering window title strings. |
20 | 23 | . Added proof-of-concept support for Snappy packaging for Ubuntu Core. | 23 | . Added proof-of-concept support for Snappy packaging for Ubuntu Core. |
21 | 24 | . Drop support for C++11. Now C++14 is required to build Mir. | 24 | . Drop support for C++11. Now C++14 is required to build Mir. |
22 | 25 | . Deprecated MirEventDelegate. Now you just pass the two fields as | ||
23 | 26 | parameters directly to mir_surface_set_event_handler(). | ||
24 | 25 | . TODO: mention more enhancements | 27 | . TODO: mention more enhancements |
25 | 26 | - ABI summary: Servers need rebuilding, but clients do not; | 28 | - ABI summary: Servers need rebuilding, but clients do not; |
26 | 27 | . Mirclient ABI unchanged at 8 | 29 | . Mirclient ABI unchanged at 8 |
27 | 28 | 30 | ||
28 | === modified file 'examples/demo_client_display_config.c' | |||
29 | --- examples/demo_client_display_config.c 2015-03-30 03:20:27 +0000 | |||
30 | +++ examples/demo_client_display_config.c 2015-03-31 02:56:11 +0000 | |||
31 | @@ -368,8 +368,7 @@ | |||
32 | 368 | mir_connection_set_display_config_change_callback( | 368 | mir_connection_set_display_config_change_callback( |
33 | 369 | connection, display_change_callback, &ctx); | 369 | connection, display_change_callback, &ctx); |
34 | 370 | 370 | ||
37 | 371 | struct MirEventDelegate ed = {event_callback, &ctx}; | 371 | mir_surface_set_event_handler(surface, event_callback, &ctx); |
36 | 372 | mir_surface_set_event_handler(surface, &ed); | ||
38 | 373 | 372 | ||
39 | 374 | time_t start = time(NULL); | 373 | time_t start = time(NULL); |
40 | 375 | 374 | ||
41 | 376 | 375 | ||
42 | === modified file 'examples/eglapp.c' | |||
43 | --- examples/eglapp.c 2015-03-30 10:43:51 +0000 | |||
44 | +++ examples/eglapp.c 2015-03-31 02:56:11 +0000 | |||
45 | @@ -189,11 +189,6 @@ | |||
46 | 189 | EGL_CONTEXT_CLIENT_VERSION, 2, | 189 | EGL_CONTEXT_CLIENT_VERSION, 2, |
47 | 190 | EGL_NONE | 190 | EGL_NONE |
48 | 191 | }; | 191 | }; |
49 | 192 | MirEventDelegate delegate = | ||
50 | 193 | { | ||
51 | 194 | mir_eglapp_handle_event, | ||
52 | 195 | NULL | ||
53 | 196 | }; | ||
54 | 197 | EGLConfig eglconfig; | 192 | EGLConfig eglconfig; |
55 | 198 | EGLint neglconfigs; | 193 | EGLint neglconfigs; |
56 | 199 | EGLContext eglctx; | 194 | EGLContext eglctx; |
57 | @@ -407,7 +402,7 @@ | |||
58 | 407 | 402 | ||
59 | 408 | CHECK(mir_surface_is_valid(surface), "Can't create a surface"); | 403 | CHECK(mir_surface_is_valid(surface), "Can't create a surface"); |
60 | 409 | 404 | ||
62 | 410 | mir_surface_set_event_handler(surface, &delegate); | 405 | mir_surface_set_event_handler(surface, mir_eglapp_handle_event, NULL); |
63 | 411 | 406 | ||
64 | 412 | MirCursorConfiguration *conf = mir_cursor_configuration_from_name(cursor_name); | 407 | MirCursorConfiguration *conf = mir_cursor_configuration_from_name(cursor_name); |
65 | 413 | mir_surface_configure_cursor(surface, conf); | 408 | mir_surface_configure_cursor(surface, conf); |
66 | 414 | 409 | ||
67 | === modified file 'examples/eglsquare.cpp' | |||
68 | --- examples/eglsquare.cpp 2015-03-30 03:20:27 +0000 | |||
69 | +++ examples/eglsquare.cpp 2015-03-31 02:56:11 +0000 | |||
70 | @@ -362,8 +362,7 @@ | |||
71 | 362 | mir_surface_spec_set_name(spec.get(), __PRETTY_FUNCTION__); | 362 | mir_surface_spec_set_name(spec.get(), __PRETTY_FUNCTION__); |
72 | 363 | mir_surface_spec_set_buffer_usage(spec.get(), mir_buffer_usage_hardware); | 363 | mir_surface_spec_set_buffer_usage(spec.get(), mir_buffer_usage_hardware); |
73 | 364 | auto surface = mir_surface_create_sync(spec.get()); | 364 | auto surface = mir_surface_create_sync(spec.get()); |
76 | 365 | MirEventDelegate delegate = {&on_event, this}; | 365 | mir_surface_set_event_handler(surface, &on_event, this); |
75 | 366 | mir_surface_set_event_handler(surface, &delegate); | ||
77 | 367 | return surface; | 366 | return surface; |
78 | 368 | } | 367 | } |
79 | 369 | static void on_event(MirSurface*, const MirEvent *event, void *context) | 368 | static void on_event(MirSurface*, const MirEvent *event, void *context) |
80 | 370 | 369 | ||
81 | === modified file 'examples/fingerpaint.c' | |||
82 | --- examples/fingerpaint.c 2015-03-30 03:20:27 +0000 | |||
83 | +++ examples/fingerpaint.c 2015-03-31 02:56:11 +0000 | |||
84 | @@ -348,7 +348,6 @@ | |||
85 | 348 | MirConnection *conn; | 348 | MirConnection *conn; |
86 | 349 | MirSurface *surf; | 349 | MirSurface *surf; |
87 | 350 | MirGraphicsRegion canvas; | 350 | MirGraphicsRegion canvas; |
88 | 351 | MirEventDelegate delegate = {&on_event, &canvas}; | ||
89 | 352 | unsigned int f; | 351 | unsigned int f; |
90 | 353 | int swap_interval = 0; | 352 | int swap_interval = 0; |
91 | 354 | 353 | ||
92 | @@ -452,7 +451,7 @@ | |||
93 | 452 | { | 451 | { |
94 | 453 | mir_surface_set_title(surf, "Mir Fingerpaint"); | 452 | mir_surface_set_title(surf, "Mir Fingerpaint"); |
95 | 454 | mir_surface_set_swapinterval(surf, swap_interval); | 453 | mir_surface_set_swapinterval(surf, swap_interval); |
97 | 455 | mir_surface_set_event_handler(surf, &delegate); | 454 | mir_surface_set_event_handler(surf, &on_event, &canvas); |
98 | 456 | 455 | ||
99 | 457 | canvas.width = width; | 456 | canvas.width = width; |
100 | 458 | canvas.height = height; | 457 | canvas.height = height; |
101 | @@ -475,7 +474,7 @@ | |||
102 | 475 | } | 474 | } |
103 | 476 | 475 | ||
104 | 477 | /* Ensure canvas won't be used after it's freed */ | 476 | /* Ensure canvas won't be used after it's freed */ |
106 | 478 | mir_surface_set_event_handler(surf, NULL); | 477 | mir_surface_set_event_handler(surf, NULL, NULL); |
107 | 479 | free(canvas.vaddr); | 478 | free(canvas.vaddr); |
108 | 480 | } | 479 | } |
109 | 481 | else | 480 | else |
110 | 482 | 481 | ||
111 | === modified file 'include/client/mir_toolkit/client_types.h' | |||
112 | --- include/client/mir_toolkit/client_types.h 2015-03-30 03:20:27 +0000 | |||
113 | +++ include/client/mir_toolkit/client_types.h 2015-03-31 02:56:11 +0000 | |||
114 | @@ -278,17 +278,6 @@ | |||
115 | 278 | MirDisplayCard *cards; | 278 | MirDisplayCard *cards; |
116 | 279 | } MirDisplayConfiguration; | 279 | } MirDisplayConfiguration; |
117 | 280 | 280 | ||
118 | 281 | /** | ||
119 | 282 | * MirEventDelegate may be used to specify (at surface creation time) | ||
120 | 283 | * callbacks for handling of events. | ||
121 | 284 | */ | ||
122 | 285 | typedef mir_surface_event_callback mir_event_delegate_callback; | ||
123 | 286 | typedef struct MirEventDelegate | ||
124 | 287 | { | ||
125 | 288 | mir_event_delegate_callback callback; | ||
126 | 289 | void *context; | ||
127 | 290 | } MirEventDelegate; | ||
128 | 291 | |||
129 | 292 | typedef struct MirRectangle | 281 | typedef struct MirRectangle |
130 | 293 | { | 282 | { |
131 | 294 | int left; | 283 | int left; |
132 | 295 | 284 | ||
133 | === modified file 'include/client/mir_toolkit/mir_surface.h' | |||
134 | --- include/client/mir_toolkit/mir_surface.h 2015-03-30 03:20:27 +0000 | |||
135 | +++ include/client/mir_toolkit/mir_surface.h 2015-03-31 02:56:11 +0000 | |||
136 | @@ -319,10 +319,12 @@ | |||
137 | 319 | * called back in different threads, for the same surface, | 319 | * called back in different threads, for the same surface, |
138 | 320 | * simultaneously. | 320 | * simultaneously. |
139 | 321 | * \param [in] surface The surface | 321 | * \param [in] surface The surface |
141 | 322 | * \param [in] event_handler The event handler to call | 322 | * \param [in] callback The callback function |
142 | 323 | * \param [in] context Additional argument to be passed to callback | ||
143 | 323 | */ | 324 | */ |
144 | 324 | void mir_surface_set_event_handler(MirSurface *surface, | 325 | void mir_surface_set_event_handler(MirSurface *surface, |
146 | 325 | MirEventDelegate const *event_handler); | 326 | mir_surface_event_callback callback, |
147 | 327 | void* context); | ||
148 | 326 | 328 | ||
149 | 327 | /** | 329 | /** |
150 | 328 | * Retrieve the primary MirBufferStream associated with a surface (to advance buffers, | 330 | * Retrieve the primary MirBufferStream associated with a surface (to advance buffers, |
151 | 329 | 331 | ||
152 | === modified file 'src/client/mir_surface_api.cpp' | |||
153 | --- src/client/mir_surface_api.cpp 2015-03-30 03:20:27 +0000 | |||
154 | +++ src/client/mir_surface_api.cpp 2015-03-31 02:56:11 +0000 | |||
155 | @@ -225,14 +225,33 @@ | |||
156 | 225 | return surface; | 225 | return surface; |
157 | 226 | } | 226 | } |
158 | 227 | 227 | ||
161 | 228 | void mir_surface_set_event_handler(MirSurface* surface, | 228 | __asm__(".symver new_mir_surface_set_event_handler,mir_surface_set_event_handler@@MIR_CLIENT_8.4"); |
162 | 229 | MirEventDelegate const* delegate) | 229 | extern "C" |
163 | 230 | void new_mir_surface_set_event_handler(MirSurface* surface, | ||
164 | 231 | mir_surface_event_callback callback, | ||
165 | 232 | void* context) | ||
166 | 233 | { | ||
167 | 234 | surface->set_event_handler(callback, context); | ||
168 | 235 | } | ||
169 | 236 | |||
170 | 237 | // Deprecated but ABI backward compatible ---> | ||
171 | 238 | typedef struct MirEventDelegate | ||
172 | 239 | { | ||
173 | 240 | mir_surface_event_callback callback; | ||
174 | 241 | void *context; | ||
175 | 242 | } MirEventDelegate; | ||
176 | 243 | |||
177 | 244 | __asm__(".symver old_mir_surface_set_event_handler,mir_surface_set_event_handler@MIR_CLIENT_8"); | ||
178 | 245 | extern "C" | ||
179 | 246 | void old_mir_surface_set_event_handler(MirSurface* surface, | ||
180 | 247 | MirEventDelegate const* delegate) | ||
181 | 230 | { | 248 | { |
182 | 231 | if (delegate) | 249 | if (delegate) |
183 | 232 | surface->set_event_handler(delegate->callback, delegate->context); | 250 | surface->set_event_handler(delegate->callback, delegate->context); |
184 | 233 | else | 251 | else |
185 | 234 | surface->set_event_handler(nullptr, nullptr); | 252 | surface->set_event_handler(nullptr, nullptr); |
186 | 235 | } | 253 | } |
187 | 254 | // <--- Deprecated | ||
188 | 236 | 255 | ||
189 | 237 | MirEGLNativeWindowType mir_surface_get_egl_native_window(MirSurface* surface) | 256 | MirEGLNativeWindowType mir_surface_get_egl_native_window(MirSurface* surface) |
190 | 238 | { | 257 | { |
191 | 239 | 258 | ||
192 | === modified file 'src/client/symbols.map' | |||
193 | --- src/client/symbols.map 2015-03-30 03:20:27 +0000 | |||
194 | +++ src/client/symbols.map 2015-03-31 02:56:11 +0000 | |||
195 | @@ -103,7 +103,7 @@ | |||
196 | 103 | mir_surface_spec_set_preferred_orientation; | 103 | mir_surface_spec_set_preferred_orientation; |
197 | 104 | } MIR_CLIENT_8.1; | 104 | } MIR_CLIENT_8.1; |
198 | 105 | 105 | ||
200 | 106 | MIR_CLIENT_8.3 { | 106 | MIR_CLIENT_8.3 { # New in Mir 0.11 |
201 | 107 | global: | 107 | global: |
202 | 108 | mir_connection_create_spec_for_dialog; | 108 | mir_connection_create_spec_for_dialog; |
203 | 109 | mir_connection_create_spec_for_menu; | 109 | mir_connection_create_spec_for_menu; |
204 | @@ -113,6 +113,7 @@ | |||
205 | 113 | 113 | ||
206 | 114 | MIR_CLIENT_8.4 { # New in Mir 0.13 | 114 | MIR_CLIENT_8.4 { # New in Mir 0.13 |
207 | 115 | global: | 115 | global: |
208 | 116 | mir_surface_set_event_handler; | ||
209 | 116 | mir_surface_set_title; | 117 | mir_surface_set_title; |
210 | 117 | mir_default_cursor_name; | 118 | mir_default_cursor_name; |
211 | 118 | mir_disabled_cursor_name; | 119 | mir_disabled_cursor_name; |
212 | 119 | 120 | ||
213 | === modified file 'src/server/graphics/nested/host_connection.h' | |||
214 | --- src/server/graphics/nested/host_connection.h 2015-02-02 12:18:18 +0000 | |||
215 | +++ src/server/graphics/nested/host_connection.h 2015-03-31 02:56:11 +0000 | |||
216 | @@ -43,7 +43,8 @@ | |||
217 | 43 | virtual ~HostSurface() = default; | 43 | virtual ~HostSurface() = default; |
218 | 44 | 44 | ||
219 | 45 | virtual EGLNativeWindowType egl_native_window() = 0; | 45 | virtual EGLNativeWindowType egl_native_window() = 0; |
221 | 46 | virtual void set_event_handler(MirEventDelegate const* handler) = 0; | 46 | virtual void set_event_handler(mir_surface_event_callback cb, |
222 | 47 | void* context) = 0; | ||
223 | 47 | 48 | ||
224 | 48 | protected: | 49 | protected: |
225 | 49 | HostSurface() = default; | 50 | HostSurface() = default; |
226 | 50 | 51 | ||
227 | === modified file 'src/server/graphics/nested/mir_client_host_connection.cpp' | |||
228 | --- src/server/graphics/nested/mir_client_host_connection.cpp 2015-03-30 03:20:27 +0000 | |||
229 | +++ src/server/graphics/nested/mir_client_host_connection.cpp 2015-03-31 02:56:11 +0000 | |||
230 | @@ -76,9 +76,9 @@ | |||
231 | 76 | mir_buffer_stream_get_egl_native_window(mir_surface_get_buffer_stream(mir_surface))); | 76 | mir_buffer_stream_get_egl_native_window(mir_surface_get_buffer_stream(mir_surface))); |
232 | 77 | } | 77 | } |
233 | 78 | 78 | ||
235 | 79 | void set_event_handler(MirEventDelegate const* handler) override | 79 | void set_event_handler(mir_surface_event_callback cb, void* context) override |
236 | 80 | { | 80 | { |
238 | 81 | mir_surface_set_event_handler(mir_surface, handler); | 81 | mir_surface_set_event_handler(mir_surface, cb, context); |
239 | 82 | } | 82 | } |
240 | 83 | 83 | ||
241 | 84 | private: | 84 | private: |
242 | 85 | 85 | ||
243 | === modified file 'src/server/graphics/nested/nested_output.cpp' | |||
244 | --- src/server/graphics/nested/nested_output.cpp 2015-03-30 03:20:27 +0000 | |||
245 | +++ src/server/graphics/nested/nested_output.cpp 2015-03-31 02:56:11 +0000 | |||
246 | @@ -45,8 +45,7 @@ | |||
247 | 45 | dispatcher{dispatcher}, | 45 | dispatcher{dispatcher}, |
248 | 46 | egl_surface{egl_display, host_surface->egl_native_window(), egl_config} | 46 | egl_surface{egl_display, host_surface->egl_native_window(), egl_config} |
249 | 47 | { | 47 | { |
252 | 48 | MirEventDelegate ed = {event_thunk, this}; | 48 | host_surface->set_event_handler(event_thunk, this); |
251 | 49 | host_surface->set_event_handler(&ed); | ||
253 | 50 | } | 49 | } |
254 | 51 | 50 | ||
255 | 52 | geom::Rectangle mgn::detail::NestedOutput::view_area() const | 51 | geom::Rectangle mgn::detail::NestedOutput::view_area() const |
256 | 53 | 52 | ||
257 | === modified file 'tests/acceptance-tests/test_client_focus_notification.cpp' | |||
258 | --- tests/acceptance-tests/test_client_focus_notification.cpp 2015-03-30 10:43:51 +0000 | |||
259 | +++ tests/acceptance-tests/test_client_focus_notification.cpp 2015-03-31 02:56:11 +0000 | |||
260 | @@ -84,12 +84,7 @@ | |||
261 | 84 | // We need to set the event delegate from the surface_created | 84 | // We need to set the event delegate from the surface_created |
262 | 85 | // callback so we can block the reading of new events | 85 | // callback so we can block the reading of new events |
263 | 86 | // until we are ready | 86 | // until we are ready |
270 | 87 | MirEventDelegate const event_delegate = | 87 | mir_surface_set_event_handler(surface_, handle_event, self); |
265 | 88 | { | ||
266 | 89 | handle_event, | ||
267 | 90 | self | ||
268 | 91 | }; | ||
269 | 92 | mir_surface_set_event_handler(surface_, &event_delegate); | ||
271 | 93 | } | 88 | } |
272 | 94 | }; | 89 | }; |
273 | 95 | } | 90 | } |
274 | 96 | 91 | ||
275 | === modified file 'tests/acceptance-tests/test_client_input.cpp' | |||
276 | --- tests/acceptance-tests/test_client_input.cpp 2015-03-12 14:12:15 +0000 | |||
277 | +++ tests/acceptance-tests/test_client_input.cpp 2015-03-31 02:56:11 +0000 | |||
278 | @@ -56,8 +56,7 @@ | |||
279 | 56 | { | 56 | { |
280 | 57 | ConnectedClientWithASurface::SetUp(); | 57 | ConnectedClientWithASurface::SetUp(); |
281 | 58 | 58 | ||
284 | 59 | MirEventDelegate const event_delegate { handle_input, this }; | 59 | mir_surface_set_event_handler(surface, handle_input, this); |
283 | 60 | mir_surface_set_event_handler(surface, &event_delegate); | ||
285 | 61 | mir_buffer_stream_swap_buffers_sync( | 60 | mir_buffer_stream_swap_buffers_sync( |
286 | 62 | mir_surface_get_buffer_stream(surface)); | 61 | mir_surface_get_buffer_stream(surface)); |
287 | 63 | 62 | ||
288 | 64 | 63 | ||
289 | === modified file 'tests/acceptance-tests/test_client_surface_events.cpp' | |||
290 | --- tests/acceptance-tests/test_client_surface_events.cpp 2015-03-30 20:13:06 +0000 | |||
291 | +++ tests/acceptance-tests/test_client_surface_events.cpp 2015-03-31 02:56:11 +0000 | |||
292 | @@ -71,7 +71,6 @@ | |||
293 | 71 | std::condition_variable last_event_cv; | 71 | std::condition_variable last_event_cv; |
294 | 72 | MirEvent last_event{}; | 72 | MirEvent last_event{}; |
295 | 73 | MirSurface* last_event_surface = nullptr; | 73 | MirSurface* last_event_surface = nullptr; |
296 | 74 | MirEventDelegate delegate{&event_callback, this}; | ||
297 | 75 | 74 | ||
298 | 76 | std::shared_ptr<ms::Surface> scene_surface; | 75 | std::shared_ptr<ms::Surface> scene_surface; |
299 | 77 | 76 | ||
300 | @@ -128,12 +127,12 @@ | |||
301 | 128 | 127 | ||
302 | 129 | mtf::ConnectedClientWithASurface::SetUp(); | 128 | mtf::ConnectedClientWithASurface::SetUp(); |
303 | 130 | 129 | ||
305 | 131 | mir_surface_set_event_handler(surface, &delegate); | 130 | mir_surface_set_event_handler(surface, &event_callback, this); |
306 | 132 | 131 | ||
307 | 133 | scene_surface = the_latest_surface(); | 132 | scene_surface = the_latest_surface(); |
308 | 134 | 133 | ||
309 | 135 | other_surface = mtf::make_any_surface(connection); | 134 | other_surface = mtf::make_any_surface(connection); |
311 | 136 | mir_surface_set_event_handler(other_surface, nullptr); | 135 | mir_surface_set_event_handler(other_surface, nullptr, nullptr); |
312 | 137 | 136 | ||
313 | 138 | reset_last_event(); | 137 | reset_last_event(); |
314 | 139 | } | 138 | } |
315 | 140 | 139 | ||
316 | === modified file 'tests/acceptance-tests/test_client_surface_visibility.cpp' | |||
317 | --- tests/acceptance-tests/test_client_surface_visibility.cpp 2015-03-30 20:13:06 +0000 | |||
318 | +++ tests/acceptance-tests/test_client_surface_visibility.cpp 2015-03-31 02:56:11 +0000 | |||
319 | @@ -114,8 +114,7 @@ | |||
320 | 114 | 114 | ||
321 | 115 | mtf::ConnectedClientWithASurface::SetUp(); | 115 | mtf::ConnectedClientWithASurface::SetUp(); |
322 | 116 | 116 | ||
325 | 117 | MirEventDelegate delegate{&event_callback, &mock_visibility_callback}; | 117 | mir_surface_set_event_handler(surface, &event_callback, &mock_visibility_callback); |
324 | 118 | mir_surface_set_event_handler(surface, &delegate); | ||
326 | 119 | 118 | ||
327 | 120 | // Swap enough buffers to ensure compositor threads are into run loop | 119 | // Swap enough buffers to ensure compositor threads are into run loop |
328 | 121 | for (auto i = 0; i != 11; ++i) | 120 | for (auto i = 0; i != 11; ++i) |
329 | 122 | 121 | ||
330 | === modified file 'tests/acceptance-tests/throwback/test_client_input.cpp' | |||
331 | --- tests/acceptance-tests/throwback/test_client_input.cpp 2015-03-30 03:20:27 +0000 | |||
332 | +++ tests/acceptance-tests/throwback/test_client_input.cpp 2015-03-31 02:56:11 +0000 | |||
333 | @@ -91,8 +91,7 @@ | |||
334 | 91 | surface = mir_surface_create_sync(spec); | 91 | surface = mir_surface_create_sync(spec); |
335 | 92 | mir_surface_spec_release(spec); | 92 | mir_surface_spec_release(spec); |
336 | 93 | 93 | ||
339 | 94 | MirEventDelegate const event_delegate { handle_input, this }; | 94 | mir_surface_set_event_handler(surface, handle_input, this); |
338 | 95 | mir_surface_set_event_handler(surface, &event_delegate); | ||
340 | 96 | mir_buffer_stream_swap_buffers_sync( | 95 | mir_buffer_stream_swap_buffers_sync( |
341 | 97 | mir_surface_get_buffer_stream(surface)); | 96 | mir_surface_get_buffer_stream(surface)); |
342 | 98 | 97 | ||
343 | 99 | 98 | ||
344 | === modified file 'tests/include/mir_test_doubles/stub_host_connection.h' | |||
345 | --- tests/include/mir_test_doubles/stub_host_connection.h 2015-03-30 03:20:27 +0000 | |||
346 | +++ tests/include/mir_test_doubles/stub_host_connection.h 2015-03-31 02:56:11 +0000 | |||
347 | @@ -55,7 +55,7 @@ | |||
348 | 55 | { | 55 | { |
349 | 56 | public: | 56 | public: |
350 | 57 | EGLNativeWindowType egl_native_window() override { return {}; } | 57 | EGLNativeWindowType egl_native_window() override { return {}; } |
352 | 58 | void set_event_handler(MirEventDelegate const*) override {} | 58 | void set_event_handler(mir_surface_event_callback, void*) override {} |
353 | 59 | }; | 59 | }; |
354 | 60 | 60 | ||
355 | 61 | return std::make_shared<NullHostSurface>(); | 61 | return std::make_shared<NullHostSurface>(); |
356 | 62 | 62 | ||
357 | === modified file 'tests/unit-tests/graphics/nested/test_nested_display_buffer.cpp' | |||
358 | --- tests/unit-tests/graphics/nested/test_nested_display_buffer.cpp 2015-03-30 03:20:27 +0000 | |||
359 | +++ tests/unit-tests/graphics/nested/test_nested_display_buffer.cpp 2015-03-31 02:56:11 +0000 | |||
360 | @@ -38,7 +38,7 @@ | |||
361 | 38 | { | 38 | { |
362 | 39 | public: | 39 | public: |
363 | 40 | EGLNativeWindowType egl_native_window() override { return {}; } | 40 | EGLNativeWindowType egl_native_window() override { return {}; } |
365 | 41 | void set_event_handler(MirEventDelegate const*) override {} | 41 | void set_event_handler(mir_surface_event_callback, void*) override {} |
366 | 42 | }; | 42 | }; |
367 | 43 | 43 | ||
368 | 44 | struct NestedDisplayBufferTest : testing::Test | 44 | struct NestedDisplayBufferTest : testing::Test |
PASSED: Continuous integration, rev:2432 jenkins. qa.ubuntu. com/job/ mir-ci/ 3406/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/1880 jenkins. qa.ubuntu. com/job/ mir-clang- vivid-amd64- build/1879 jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/1830 jenkins. qa.ubuntu. com/job/ mir-vivid- amd64-ci/ 1403 jenkins. qa.ubuntu. com/job/ mir-vivid- amd64-ci/ 1403/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 1830 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 1830/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/4783 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 19267
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/3406/ rebuild
http://