Merge lp:~brandontschaefer/mir/use-mir-window-event into lp:mir
- use-mir-window-event
- Merge into development-branch
Status: | Merged |
---|---|
Merged at revision: | 3922 |
Proposed branch: | lp:~brandontschaefer/mir/use-mir-window-event |
Merge into: | lp:mir |
Prerequisite: | lp:~brandontschaefer/mir/mir-window-attrib |
Diff against target: |
639 lines (+166/-79) 25 files modified
examples/eglapp.c (+4/-4) include/client/mir/event_printer.h (+1/-1) include/client/mir_toolkit/events/event.h (+12/-0) include/client/mir_toolkit/events/surface_event.h (+2/-0) include/client/mir_toolkit/events/window_event.h (+53/-0) include/test/mir/test/event_matchers.h (+4/-4) src/client/event.cpp (+20/-3) src/client/event_printer.cpp (+12/-12) src/client/mir_surface.cpp (+3/-3) src/client/symbols.map (+3/-0) src/common/events/event.cpp (+4/-4) src/include/common/mir/events/event.h (+2/-2) src/utils/vanity.c (+4/-4) tests/acceptance-tests/test_client_cookie.cpp (+3/-3) tests/acceptance-tests/test_client_focus_notification.cpp (+3/-3) tests/acceptance-tests/test_client_input.cpp (+5/-5) tests/acceptance-tests/test_client_surface_events.cpp (+6/-6) tests/acceptance-tests/test_client_surface_visibility.cpp (+3/-3) tests/acceptance-tests/test_confined_pointer.cpp (+4/-4) tests/acceptance-tests/test_nested_input.cpp (+5/-5) tests/acceptance-tests/test_new_display_configuration.cpp (+3/-3) tests/acceptance-tests/test_surface_raise.cpp (+3/-3) tests/acceptance-tests/test_system_compositor_window_manager.cpp (+3/-3) tests/mir_test_framework/visible_surface.cpp (+2/-2) tests/unit-tests/scene/test_surface_impl.cpp (+2/-2) |
To merge this branch: | bzr merge lp:~brandontschaefer/mir/use-mir-window-event |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Needs Fixing | |
Kevin DuBois (community) | Approve | ||
Cemil Azizoglu (community) | Approve | ||
Chris Halse Rogers | Approve | ||
Review via email: mp+314386@code.launchpad.net |
Commit message
Replace the internal usage of MirSurfaceEvent with MirWindowEvent.
Description of the change
Replace the internal usage of MirSurfaceEvent with MirWindowEvent.
Mir CI Bot (mir-ci-bot) wrote : | # |
Cemil Azizoglu (cemil-azizoglu) wrote : | # |
35 -std::ostream& operator<
36 +std::ostream& operator<
Code providing alternative implementations should not remove old code.
Cemil Azizoglu (cemil-azizoglu) wrote : | # |
>
> 35 -std::ostream& operator<
> event);
> 36 +std::ostream& operator<
> event);
>
> Code providing alternative implementations should not remove old code.
Actually I'll fix this in the followup branch I am about to put up.
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3919
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Kevin DuBois (kdub) wrote : | # |
alright once the build failure is addressed
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3920
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3921
https:/
Executed test runs:
ABORTED: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'examples/eglapp.c' |
2 | --- examples/eglapp.c 2017-01-10 22:55:27 +0000 |
3 | +++ examples/eglapp.c 2017-01-10 22:55:28 +0000 |
4 | @@ -110,10 +110,10 @@ |
5 | running = 0; |
6 | } |
7 | |
8 | -static void mir_eglapp_handle_surface_event(MirSurfaceEvent const* sev) |
9 | +static void mir_eglapp_handle_window_event(MirWindowEvent const* sev) |
10 | { |
11 | - MirWindowAttrib attrib = (MirWindowAttrib)mir_surface_event_get_attribute(sev); |
12 | - int value = mir_surface_event_get_attribute_value(sev); |
13 | + MirWindowAttrib attrib = mir_window_event_get_attribute(sev); |
14 | + int value = mir_window_event_get_attribute_value(sev); |
15 | |
16 | switch (attrib) |
17 | { |
18 | @@ -162,7 +162,7 @@ |
19 | mir_eglapp_handle_input_event(mir_event_get_input_event(ev)); |
20 | break; |
21 | case mir_event_type_window: |
22 | - mir_eglapp_handle_surface_event(mir_event_get_surface_event(ev)); |
23 | + mir_eglapp_handle_window_event(mir_event_get_window_event(ev)); |
24 | break; |
25 | case mir_event_type_window_output: |
26 | handle_surface_output_event(mir_event_get_surface_output_event(ev)); |
27 | |
28 | === modified file 'include/client/mir/event_printer.h' |
29 | --- include/client/mir/event_printer.h 2017-01-10 22:55:27 +0000 |
30 | +++ include/client/mir/event_printer.h 2017-01-10 22:55:28 +0000 |
31 | @@ -48,7 +48,7 @@ |
32 | std::ostream& operator<<(std::ostream& out, MirInputEvent const& event); |
33 | std::ostream& operator<<(std::ostream& out, MirCloseSurfaceEvent const& event); |
34 | std::ostream& operator<<(std::ostream& out, MirKeymapEvent const& event); |
35 | -std::ostream& operator<<(std::ostream& out, MirSurfaceEvent const& event); |
36 | +std::ostream& operator<<(std::ostream& out, MirWindowEvent const& event); |
37 | std::ostream& operator<<(std::ostream& out, MirInputDeviceStateEvent const& event); |
38 | std::ostream& operator<<(std::ostream& out, MirSurfacePlacementEvent const& event); |
39 | std::ostream& operator<<(std::ostream& out, MirEvent const& event); |
40 | |
41 | === modified file 'include/client/mir_toolkit/events/event.h' |
42 | --- include/client/mir_toolkit/events/event.h 2017-01-10 22:55:27 +0000 |
43 | +++ include/client/mir_toolkit/events/event.h 2017-01-10 22:55:28 +0000 |
44 | @@ -82,6 +82,7 @@ |
45 | #include "mir_toolkit/events/input/input_event.h" |
46 | #include "mir_toolkit/events/resize_event.h" |
47 | #include "mir_toolkit/events/surface_event.h" |
48 | +#include "mir_toolkit/events/window_event.h" |
49 | #include "mir_toolkit/events/orientation_event.h" |
50 | #include "mir_toolkit/events/prompt_session_event.h" |
51 | #include "mir_toolkit/events/keymap_event.h" |
52 | @@ -126,6 +127,17 @@ |
53 | * \return The associated MirSurfaceEvent |
54 | */ |
55 | MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* event); |
56 | +/* __attribute__ ((deprecated("use mir_event_get_window_event instead"))); */ |
57 | + |
58 | +/** |
59 | + * Retrieve the MirWindowEvent associated with a MirEvent of |
60 | + * type mir_event_type_window. See <mir_toolkit/events/surface_event.h> |
61 | + * for accessors. |
62 | + * |
63 | + * \param [in] event The event |
64 | + * \return The associated MirWindowEvent |
65 | + */ |
66 | +MirWindowEvent const* mir_event_get_window_event(MirEvent const* event); |
67 | |
68 | /** |
69 | * Retrieve the MirResizeEvent associated with a MirEvent of |
70 | |
71 | === modified file 'include/client/mir_toolkit/events/surface_event.h' |
72 | --- include/client/mir_toolkit/events/surface_event.h 2016-10-12 06:03:15 +0000 |
73 | +++ include/client/mir_toolkit/events/surface_event.h 2017-01-10 22:55:28 +0000 |
74 | @@ -36,6 +36,7 @@ |
75 | * \return The associated attribute |
76 | */ |
77 | MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* event); |
78 | +/* __attribute__ ((deprecated("use make_event with mir_window_event_get_attribute instead"))); */ |
79 | |
80 | /** |
81 | * Retrieve the new value of the associated attribute for a given MirSurfaceEvent |
82 | @@ -44,6 +45,7 @@ |
83 | * \return The associated attribute value |
84 | */ |
85 | int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event); |
86 | +/* __attribute__ ((deprecated("use make_event with mir_window_event_get_attribute_value instead"))); */ |
87 | |
88 | #ifdef __cplusplus |
89 | } |
90 | |
91 | === added file 'include/client/mir_toolkit/events/window_event.h' |
92 | --- include/client/mir_toolkit/events/window_event.h 1970-01-01 00:00:00 +0000 |
93 | +++ include/client/mir_toolkit/events/window_event.h 2017-01-10 22:55:28 +0000 |
94 | @@ -0,0 +1,53 @@ |
95 | +/* |
96 | + * Copyright © 2017 Canonical Ltd. |
97 | + * |
98 | + * This program is free software: you can redistribute it and/or modify it |
99 | + * under the terms of the GNU Lesser General Public License version 3, |
100 | + * as published by the Free Software Foundation. |
101 | + * |
102 | + * This program is distributed in the hope that it will be useful, |
103 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
104 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
105 | + * GNU Lesser General Public License for more details. |
106 | + * |
107 | + * You should have received a copy of the GNU Lesser General Public License |
108 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
109 | + * |
110 | + * Authored by: Brandon Schaefer <brandon.schaefer@canonical.com> |
111 | + */ |
112 | + |
113 | +#ifndef MIR_TOOLKIT_EVENTS_WINDOW_EVENT_H_ |
114 | +#define MIR_TOOLKIT_EVENTS_WINDOW_EVENT_H_ |
115 | + |
116 | +#include <mir_toolkit/events/event.h> |
117 | + |
118 | +#ifdef __cplusplus |
119 | +/** |
120 | + * \addtogroup mir_toolkit |
121 | + * @{ |
122 | + */ |
123 | +extern "C" { |
124 | +#endif |
125 | + |
126 | +/** |
127 | + * Retrieve the attribute index configured with a given MirWindowEvent |
128 | + * |
129 | + * \param [in] event The event |
130 | + * \return The associated attribute |
131 | + */ |
132 | +MirWindowAttrib mir_window_event_get_attribute(MirWindowEvent const* event); |
133 | + |
134 | +/** |
135 | + * Retrieve the new value of the associated attribute for a given MirWindowEvent |
136 | + * |
137 | + * \param [in] event The event |
138 | + * \return The associated attribute value |
139 | + */ |
140 | +int mir_window_event_get_attribute_value(MirWindowEvent const* event); |
141 | + |
142 | +#ifdef __cplusplus |
143 | +} |
144 | +/**@}*/ |
145 | +#endif |
146 | + |
147 | +#endif /* MIR_TOOLKIT_WINDOW_EVENT_H_ */ |
148 | |
149 | === modified file 'include/test/mir/test/event_matchers.h' |
150 | --- include/test/mir/test/event_matchers.h 2017-01-10 22:55:27 +0000 |
151 | +++ include/test/mir/test/event_matchers.h 2017-01-10 22:55:28 +0000 |
152 | @@ -488,16 +488,16 @@ |
153 | return true; |
154 | } |
155 | |
156 | -MATCHER_P2(SurfaceEvent, attrib, value, "") |
157 | +MATCHER_P2(WindowEvent, attrib, value, "") |
158 | { |
159 | auto as_address = to_address(arg); |
160 | if (mir_event_get_type(as_address) != mir_event_type_window) |
161 | return false; |
162 | - auto surface_ev = mir_event_get_surface_event(as_address); |
163 | - auto window_attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(surface_ev)); |
164 | + auto surface_ev = mir_event_get_window_event(as_address); |
165 | + auto window_attrib = mir_window_event_get_attribute(surface_ev); |
166 | if (window_attrib != attrib) |
167 | return false; |
168 | - if (mir_surface_event_get_attribute_value(surface_ev) != value) |
169 | + if (mir_window_event_get_attribute_value(surface_ev) != value) |
170 | return false; |
171 | return true; |
172 | } |
173 | |
174 | === modified file 'src/client/event.cpp' |
175 | --- src/client/event.cpp 2017-01-10 22:55:27 +0000 |
176 | +++ src/client/event.cpp 2017-01-10 22:55:28 +0000 |
177 | @@ -113,6 +113,11 @@ |
178 | |
179 | MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
180 | { |
181 | + return mir_event_get_window_event(ev); |
182 | +}) |
183 | + |
184 | +MirWindowEvent const* mir_event_get_window_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
185 | +{ |
186 | expect_event_type(ev, mir_event_type_window); |
187 | |
188 | return ev->to_surface(); |
189 | @@ -181,13 +186,25 @@ |
190 | |
191 | MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
192 | { |
193 | - expect_event_type(ev, mir_event_type_window); |
194 | - |
195 | - return static_cast<MirSurfaceAttrib>(ev->attrib()); |
196 | + return static_cast<MirSurfaceAttrib>(mir_window_event_get_attribute(ev)); |
197 | }) |
198 | |
199 | int mir_surface_event_get_attribute_value(MirSurfaceEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
200 | { |
201 | + return mir_window_event_get_attribute_value(ev); |
202 | +}) |
203 | + |
204 | +/* Window event accessors */ |
205 | + |
206 | +MirWindowAttrib mir_window_event_get_attribute(MirWindowEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
207 | +{ |
208 | + expect_event_type(ev, mir_event_type_window); |
209 | + |
210 | + return ev->attrib(); |
211 | +}) |
212 | + |
213 | +int mir_window_event_get_attribute_value(MirWindowEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
214 | +{ |
215 | expect_event_type(ev, mir_event_type_window); |
216 | |
217 | return ev->value(); |
218 | |
219 | === modified file 'src/client/event_printer.cpp' |
220 | --- src/client/event_printer.cpp 2017-01-10 22:55:27 +0000 |
221 | +++ src/client/event_printer.cpp 2017-01-10 22:55:28 +0000 |
222 | @@ -304,32 +304,32 @@ |
223 | return out << "close_surface_event()"; |
224 | } |
225 | |
226 | -std::ostream& mir::operator<<(std::ostream& out, MirSurfaceEvent const& event) |
227 | +std::ostream& mir::operator<<(std::ostream& out, MirWindowEvent const& event) |
228 | { |
229 | - out << "surface_event(" |
230 | - << mir_surface_event_get_attribute(&event)<< '='; |
231 | - auto value = mir_surface_event_get_attribute_value(&event); |
232 | - switch (mir_surface_event_get_attribute(&event)) |
233 | + out << "window_event(" |
234 | + << mir_window_event_get_attribute(&event)<< '='; |
235 | + auto value = mir_window_event_get_attribute_value(&event); |
236 | + switch (mir_window_event_get_attribute(&event)) |
237 | { |
238 | - case mir_surface_attrib_type: |
239 | + case mir_window_attrib_type: |
240 | out << static_cast<MirSurfaceType>(value); |
241 | break; |
242 | - case mir_surface_attrib_state: |
243 | + case mir_window_attrib_state: |
244 | out << static_cast<MirSurfaceState>(value); |
245 | break; |
246 | - case mir_surface_attrib_swapinterval: |
247 | + case mir_window_attrib_swapinterval: |
248 | out << value; |
249 | break; |
250 | - case mir_surface_attrib_focus: |
251 | + case mir_window_attrib_focus: |
252 | out << static_cast<MirSurfaceFocusState>(value); |
253 | break; |
254 | - case mir_surface_attrib_dpi: |
255 | + case mir_window_attrib_dpi: |
256 | out << value; |
257 | break; |
258 | - case mir_surface_attrib_visibility: |
259 | + case mir_window_attrib_visibility: |
260 | out << static_cast<MirSurfaceVisibility>(value); |
261 | break; |
262 | - case mir_surface_attrib_preferred_orientation: |
263 | + case mir_window_attrib_preferred_orientation: |
264 | out << value; |
265 | break; |
266 | default: |
267 | |
268 | === modified file 'src/client/mir_surface.cpp' |
269 | --- src/client/mir_surface.cpp 2017-01-10 22:55:27 +0000 |
270 | +++ src/client/mir_surface.cpp 2017-01-10 22:55:28 +0000 |
271 | @@ -432,10 +432,10 @@ |
272 | { |
273 | case mir_event_type_window: |
274 | { |
275 | - auto sev = mir_event_get_surface_event(&e); |
276 | - auto a = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(sev)); |
277 | + auto sev = mir_event_get_window_event(&e); |
278 | + auto a = mir_window_event_get_attribute(sev); |
279 | if (a < mir_window_attribs) |
280 | - attrib_cache[a] = mir_surface_event_get_attribute_value(sev); |
281 | + attrib_cache[a] = mir_window_event_get_attribute_value(sev); |
282 | break; |
283 | } |
284 | case mir_event_type_orientation: |
285 | |
286 | === modified file 'src/client/symbols.map' |
287 | --- src/client/symbols.map 2017-01-09 06:48:47 +0000 |
288 | +++ src/client/symbols.map 2017-01-10 22:55:28 +0000 |
289 | @@ -550,4 +550,7 @@ |
290 | mir_window_get_parameters; |
291 | mir_window_get_orientation; |
292 | mir_window_raise; |
293 | + mir_event_get_window_event; |
294 | + mir_window_event_get_attribute; |
295 | + mir_window_event_get_attribute_value; |
296 | } MIR_CLIENT_0.25; |
297 | |
298 | === modified file 'src/common/events/event.cpp' |
299 | --- src/common/events/event.cpp 2017-01-09 18:55:55 +0000 |
300 | +++ src/common/events/event.cpp 2017-01-10 22:55:28 +0000 |
301 | @@ -133,14 +133,14 @@ |
302 | } |
303 | #pragma GCC diagnostic pop |
304 | |
305 | -MirSurfaceEvent* MirEvent::to_surface() |
306 | +MirWindowEvent* MirEvent::to_surface() |
307 | { |
308 | - return static_cast<MirSurfaceEvent*>(this); |
309 | + return static_cast<MirWindowEvent*>(this); |
310 | } |
311 | |
312 | -MirSurfaceEvent const* MirEvent::to_surface() const |
313 | +MirWindowEvent const* MirEvent::to_surface() const |
314 | { |
315 | - return static_cast<MirSurfaceEvent const*>(this); |
316 | + return static_cast<MirWindowEvent const*>(this); |
317 | } |
318 | |
319 | MirResizeEvent* MirEvent::to_resize() |
320 | |
321 | === modified file 'src/include/common/mir/events/event.h' |
322 | --- src/include/common/mir/events/event.h 2016-11-11 06:59:42 +0000 |
323 | +++ src/include/common/mir/events/event.h 2017-01-10 22:55:28 +0000 |
324 | @@ -40,8 +40,8 @@ |
325 | MirInputConfigurationEvent* to_input_configuration(); |
326 | MirInputConfigurationEvent const* to_input_configuration() const; |
327 | |
328 | - MirSurfaceEvent* to_surface(); |
329 | - MirSurfaceEvent const* to_surface() const; |
330 | + MirWindowEvent* to_surface(); |
331 | + MirWindowEvent const* to_surface() const; |
332 | |
333 | MirResizeEvent* to_resize(); |
334 | MirResizeEvent const* to_resize() const; |
335 | |
336 | === modified file 'src/utils/vanity.c' |
337 | --- src/utils/vanity.c 2017-01-10 22:55:27 +0000 |
338 | +++ src/utils/vanity.c 2017-01-10 22:55:28 +0000 |
339 | @@ -135,10 +135,10 @@ |
340 | return false; |
341 | } |
342 | |
343 | -static bool on_surface_event(MirSurfaceEvent const* sevent, State* state) |
344 | +static bool on_surface_event(MirWindowEvent const* sevent, State* state) |
345 | { |
346 | - MirWindowAttrib attrib = (MirWindowAttrib)mir_surface_event_get_attribute(sevent); |
347 | - int value = mir_surface_event_get_attribute_value(sevent); |
348 | + MirWindowAttrib attrib = mir_window_event_get_attribute(sevent); |
349 | + int value = mir_window_event_get_attribute_value(sevent); |
350 | |
351 | if (attrib == mir_window_attrib_visibility) |
352 | { |
353 | @@ -173,7 +173,7 @@ |
354 | handled = on_input_event(mir_event_get_input_event(event), state); |
355 | break; |
356 | case mir_event_type_window: |
357 | - handled = on_surface_event(mir_event_get_surface_event(event), state); |
358 | + handled = on_surface_event(mir_event_get_window_event(event), state); |
359 | break; |
360 | case mir_event_type_resize: |
361 | state->resized = true; |
362 | |
363 | === modified file 'tests/acceptance-tests/test_client_cookie.cpp' |
364 | --- tests/acceptance-tests/test_client_cookie.cpp 2017-01-10 22:55:27 +0000 |
365 | +++ tests/acceptance-tests/test_client_cookie.cpp 2017-01-10 22:55:28 +0000 |
366 | @@ -103,9 +103,9 @@ |
367 | |
368 | if (event_type == mir_event_type_window) |
369 | { |
370 | - auto event = mir_event_get_surface_event(ev); |
371 | - auto const attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(event)); |
372 | - auto const value = mir_surface_event_get_attribute_value(event); |
373 | + auto event = mir_event_get_window_event(ev); |
374 | + auto const attrib = mir_window_event_get_attribute(event); |
375 | + auto const value = mir_window_event_get_attribute_value(event); |
376 | |
377 | std::lock_guard<std::mutex> lk(client_cookie->mutex); |
378 | if (attrib == mir_window_attrib_visibility && |
379 | |
380 | === modified file 'tests/acceptance-tests/test_client_focus_notification.cpp' |
381 | --- tests/acceptance-tests/test_client_focus_notification.cpp 2017-01-10 22:55:27 +0000 |
382 | +++ tests/acceptance-tests/test_client_focus_notification.cpp 2017-01-10 22:55:28 +0000 |
383 | @@ -59,13 +59,13 @@ |
384 | { |
385 | if (mir_event_type_window == mir_event_get_type(ev)) |
386 | { |
387 | - auto surface_ev = mir_event_get_surface_event(ev); |
388 | - auto attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(surface_ev)); |
389 | + auto surface_ev = mir_event_get_window_event(ev); |
390 | + auto attrib = mir_window_event_get_attribute(surface_ev); |
391 | if (mir_window_attrib_focus == attrib) |
392 | { |
393 | auto self = static_cast<FocusSurface*>(context); |
394 | self->log_focus_event(window, |
395 | - static_cast<MirSurfaceFocusState>(mir_surface_event_get_attribute_value(surface_ev))); |
396 | + static_cast<MirSurfaceFocusState>(mir_window_event_get_attribute_value(surface_ev))); |
397 | } |
398 | } |
399 | } |
400 | |
401 | === modified file 'tests/acceptance-tests/test_client_input.cpp' |
402 | --- tests/acceptance-tests/test_client_input.cpp 2017-01-10 22:55:27 +0000 |
403 | +++ tests/acceptance-tests/test_client_input.cpp 2017-01-10 22:55:28 +0000 |
404 | @@ -112,10 +112,10 @@ |
405 | BOOST_THROW_EXCEPTION(std::runtime_error("Timeout waiting for window to become focused and exposed")); |
406 | } |
407 | |
408 | - void handle_surface_event(MirSurfaceEvent const* event) |
409 | + void handle_window_event(MirWindowEvent const* event) |
410 | { |
411 | - auto const attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(event)); |
412 | - auto const value = mir_surface_event_get_attribute_value(event); |
413 | + auto const attrib = mir_window_event_get_attribute(event); |
414 | + auto const value = mir_window_event_get_attribute_value(event); |
415 | |
416 | if (mir_window_attrib_visibility == attrib && |
417 | mir_surface_visibility_exposed == value) |
418 | @@ -135,8 +135,8 @@ |
419 | auto type = mir_event_get_type(ev); |
420 | if (type == mir_event_type_window) |
421 | { |
422 | - auto surface_event = mir_event_get_surface_event(ev); |
423 | - client->handle_surface_event(surface_event); |
424 | + auto window_event = mir_event_get_window_event(ev); |
425 | + client->handle_window_event(window_event); |
426 | |
427 | } |
428 | if (type == mir_event_type_input) |
429 | |
430 | === modified file 'tests/acceptance-tests/test_client_surface_events.cpp' |
431 | --- tests/acceptance-tests/test_client_surface_events.cpp 2017-01-10 22:55:27 +0000 |
432 | +++ tests/acceptance-tests/test_client_surface_events.cpp 2017-01-10 22:55:28 +0000 |
433 | @@ -202,14 +202,14 @@ |
434 | |
435 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; |
436 | |
437 | - EXPECT_THAT(last_event, mt::SurfaceEvent(mir_window_attrib_state, mir_surface_state_fullscreen)); |
438 | + EXPECT_THAT(last_event, mt::WindowEvent(mir_window_attrib_state, mir_surface_state_fullscreen)); |
439 | } |
440 | |
441 | { |
442 | mir_wait_for(mir_surface_set_state(window, static_cast<MirSurfaceState>(999))); |
443 | |
444 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; |
445 | - EXPECT_THAT(last_event, mt::SurfaceEvent(mir_window_attrib_state, mir_surface_state_fullscreen)); |
446 | + EXPECT_THAT(last_event, mt::WindowEvent(mir_window_attrib_state, mir_surface_state_fullscreen)); |
447 | } |
448 | |
449 | reset_last_event(); |
450 | @@ -219,7 +219,7 @@ |
451 | |
452 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; |
453 | |
454 | - EXPECT_THAT(last_event, mt::SurfaceEvent(mir_window_attrib_state, mir_surface_state_vertmaximized)); |
455 | + EXPECT_THAT(last_event, mt::WindowEvent(mir_window_attrib_state, mir_surface_state_vertmaximized)); |
456 | } |
457 | |
458 | reset_last_event(); |
459 | @@ -365,13 +365,13 @@ |
460 | return false; |
461 | } |
462 | |
463 | - auto surface_event = mir_event_get_surface_event(event); |
464 | - auto attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(surface_event)); |
465 | + auto window_event = mir_event_get_window_event(event); |
466 | + auto attrib = mir_window_event_get_attribute(window_event); |
467 | if (attrib != mir_window_attrib_focus) |
468 | { |
469 | return false; |
470 | } |
471 | - return mir_surface_event_get_attribute_value(surface_event) == state; |
472 | + return mir_window_event_get_attribute_value(window_event) == state; |
473 | } |
474 | |
475 | bool is_focus_event(MirEvent const* event) |
476 | |
477 | === modified file 'tests/acceptance-tests/test_client_surface_visibility.cpp' |
478 | --- tests/acceptance-tests/test_client_surface_visibility.cpp 2017-01-10 22:55:27 +0000 |
479 | +++ tests/acceptance-tests/test_client_surface_visibility.cpp 2017-01-10 22:55:28 +0000 |
480 | @@ -92,8 +92,8 @@ |
481 | { |
482 | if (mir_event_get_type(event) != mir_event_type_window) |
483 | return; |
484 | - auto sev = mir_event_get_surface_event(event); |
485 | - auto attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(sev)); |
486 | + auto sev = mir_event_get_window_event(event); |
487 | + auto attrib = mir_window_event_get_attribute(sev); |
488 | if (attrib != mir_window_attrib_visibility) |
489 | return; |
490 | |
491 | @@ -101,7 +101,7 @@ |
492 | reinterpret_cast<testing::NiceMock<MockVisibilityCallback>*>(ctx); |
493 | mock_callback->handle( |
494 | window, |
495 | - static_cast<MirSurfaceVisibility>(mir_surface_event_get_attribute_value(sev))); |
496 | + static_cast<MirSurfaceVisibility>(mir_window_event_get_attribute_value(sev))); |
497 | } |
498 | |
499 | MirSurface* create_surface(MirConnection* connection, const char* name, geom::Size size, |
500 | |
501 | === modified file 'tests/acceptance-tests/test_confined_pointer.cpp' |
502 | --- tests/acceptance-tests/test_confined_pointer.cpp 2017-01-10 22:55:27 +0000 |
503 | +++ tests/acceptance-tests/test_confined_pointer.cpp 2017-01-10 22:55:28 +0000 |
504 | @@ -110,10 +110,10 @@ |
505 | mir_window_spec_release(spec); |
506 | } |
507 | |
508 | - void handle_surface_event(MirSurfaceEvent const* event) |
509 | + void handle_window_event(MirSurfaceEvent const* event) |
510 | { |
511 | - auto const attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(event)); |
512 | - auto const value = mir_surface_event_get_attribute_value(event); |
513 | + auto const attrib = mir_window_event_get_attribute(event); |
514 | + auto const value = mir_window_event_get_attribute_value(event); |
515 | |
516 | if (mir_window_attrib_visibility == attrib && |
517 | mir_surface_visibility_exposed == value) |
518 | @@ -134,7 +134,7 @@ |
519 | switch (type) |
520 | { |
521 | case mir_event_type_window: |
522 | - client->handle_surface_event(mir_event_get_surface_event(ev)); |
523 | + client->handle_window_event(mir_event_get_window_event(ev)); |
524 | break; |
525 | case mir_event_type_input: |
526 | client->handle_input(ev); |
527 | |
528 | === modified file 'tests/acceptance-tests/test_nested_input.cpp' |
529 | --- tests/acceptance-tests/test_nested_input.cpp 2017-01-10 22:55:27 +0000 |
530 | +++ tests/acceptance-tests/test_nested_input.cpp 2017-01-10 22:55:28 +0000 |
531 | @@ -139,10 +139,10 @@ |
532 | |
533 | MOCK_METHOD1(handle_input, void(MirEvent const*)); |
534 | |
535 | - void handle_surface_event(MirSurfaceEvent const* event) |
536 | + void handle_window_event(MirWindowEvent const* event) |
537 | { |
538 | - auto const attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(event)); |
539 | - auto const value = mir_surface_event_get_attribute_value(event); |
540 | + auto const attrib = mir_window_event_get_attribute(event); |
541 | + auto const value = mir_window_event_get_attribute_value(event); |
542 | |
543 | if (mir_window_attrib_visibility == attrib && |
544 | mir_surface_visibility_exposed == value) |
545 | @@ -162,8 +162,8 @@ |
546 | auto type = mir_event_get_type(ev); |
547 | if (type == mir_event_type_window) |
548 | { |
549 | - auto surface_event = mir_event_get_surface_event(ev); |
550 | - client->handle_surface_event(surface_event); |
551 | + auto window_event = mir_event_get_window_event(ev); |
552 | + client->handle_window_event(window_event); |
553 | |
554 | } |
555 | if (type == mir_event_type_input) |
556 | |
557 | === modified file 'tests/acceptance-tests/test_new_display_configuration.cpp' |
558 | --- tests/acceptance-tests/test_new_display_configuration.cpp 2017-01-10 22:55:27 +0000 |
559 | +++ tests/acceptance-tests/test_new_display_configuration.cpp 2017-01-10 22:55:28 +0000 |
560 | @@ -283,9 +283,9 @@ |
561 | auto type = mir_event_get_type(ev); |
562 | if (type == mir_event_type_window) |
563 | { |
564 | - auto surface_event = mir_event_get_surface_event(ev); |
565 | - auto const attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(surface_event)); |
566 | - auto const value = mir_surface_event_get_attribute_value(surface_event); |
567 | + auto window_event = mir_event_get_window_event(ev); |
568 | + auto const attrib = mir_window_event_get_attribute(window_event); |
569 | + auto const value = mir_window_event_get_attribute_value(window_event); |
570 | |
571 | std::lock_guard<std::mutex> lk(client->mutex); |
572 | if (mir_window_attrib_focus == attrib && |
573 | |
574 | === modified file 'tests/acceptance-tests/test_surface_raise.cpp' |
575 | --- tests/acceptance-tests/test_surface_raise.cpp 2017-01-10 22:55:27 +0000 |
576 | +++ tests/acceptance-tests/test_surface_raise.cpp 2017-01-10 22:55:28 +0000 |
577 | @@ -114,9 +114,9 @@ |
578 | |
579 | if (event_type == mir_event_type_window) |
580 | { |
581 | - auto event = mir_event_get_surface_event(ev); |
582 | - auto const attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(event)); |
583 | - auto const value = mir_surface_event_get_attribute_value(event); |
584 | + auto event = mir_event_get_window_event(ev); |
585 | + auto const attrib = mir_window_event_get_attribute(event); |
586 | + auto const value = mir_window_event_get_attribute_value(event); |
587 | |
588 | std::lock_guard<std::mutex> lk(raise_surfaces->mutex); |
589 | |
590 | |
591 | === modified file 'tests/acceptance-tests/test_system_compositor_window_manager.cpp' |
592 | --- tests/acceptance-tests/test_system_compositor_window_manager.cpp 2017-01-10 22:55:27 +0000 |
593 | +++ tests/acceptance-tests/test_system_compositor_window_manager.cpp 2017-01-10 22:55:28 +0000 |
594 | @@ -177,9 +177,9 @@ |
595 | if (mir_event_get_type(arg) != mir_event_type_window) |
596 | return false; |
597 | |
598 | - auto surface_event = mir_event_get_surface_event(arg); |
599 | - auto attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(surface_event)); |
600 | - auto value = mir_surface_event_get_attribute_value(surface_event); |
601 | + auto window_event = mir_event_get_window_event(arg); |
602 | + auto attrib = mir_window_event_get_attribute(window_event); |
603 | + auto value = mir_window_event_get_attribute_value(window_event); |
604 | |
605 | return (attrib == mir_window_attrib_focus) |
606 | && (value == expected); |
607 | |
608 | === modified file 'tests/mir_test_framework/visible_surface.cpp' |
609 | --- tests/mir_test_framework/visible_surface.cpp 2017-01-10 22:55:27 +0000 |
610 | +++ tests/mir_test_framework/visible_surface.cpp 2017-01-10 22:55:28 +0000 |
611 | @@ -44,11 +44,11 @@ |
612 | { |
613 | if (mir_event_get_type(ev) == mir_event_type_window) |
614 | { |
615 | - auto attrib = static_cast<MirWindowAttrib>(mir_surface_event_get_attribute(mir_event_get_surface_event(ev))); |
616 | + auto attrib = mir_window_event_get_attribute(mir_event_get_window_event(ev)); |
617 | if (attrib == mir_window_attrib_visibility) |
618 | { |
619 | auto ctx = reinterpret_cast<VisibleSurface*>(context); |
620 | - ctx->set_visibility(surf, mir_surface_event_get_attribute_value(mir_event_get_surface_event(ev))); |
621 | + ctx->set_visibility(surf, mir_window_event_get_attribute_value(mir_event_get_window_event(ev))); |
622 | } |
623 | } |
624 | } |
625 | |
626 | === modified file 'tests/unit-tests/scene/test_surface_impl.cpp' |
627 | --- tests/unit-tests/scene/test_surface_impl.cpp 2017-01-10 22:55:27 +0000 |
628 | +++ tests/unit-tests/scene/test_surface_impl.cpp 2017-01-10 22:55:28 +0000 |
629 | @@ -235,9 +235,9 @@ |
630 | |
631 | { |
632 | InSequence seq; |
633 | - EXPECT_CALL(sink, handle_event(mt::SurfaceEvent(mir_window_attrib_focus, mir_surface_focused))) |
634 | + EXPECT_CALL(sink, handle_event(mt::WindowEvent(mir_window_attrib_focus, mir_surface_focused))) |
635 | .Times(1); |
636 | - EXPECT_CALL(sink, handle_event(mt::SurfaceEvent(mir_window_attrib_focus, mir_surface_unfocused))) |
637 | + EXPECT_CALL(sink, handle_event(mt::WindowEvent(mir_window_attrib_focus, mir_surface_unfocused))) |
638 | .Times(1); |
639 | } |
640 |
FAILED: Continuous integration, rev:3919 /mir-jenkins. ubuntu. com/job/ mir-ci/ 2598/ /mir-jenkins. ubuntu. com/job/ build-mir/ 3380/console /mir-jenkins. ubuntu. com/job/ build-0- fetch/3447 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 3439 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 3439 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= zesty/3439 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/3409/ console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial+ overlay/ 3409/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/3409 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/3409/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 3409/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 3409/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial+ overlay/ 3409/console
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ci/ 2598/rebuild
https:/