Merge lp:~brandontschaefer/mir/usr-mir-window-placement into lp:mir
- usr-mir-window-placement
- Merge into development-branch
Proposed by
Brandon Schaefer
Status: | Superseded |
---|---|
Proposed branch: | lp:~brandontschaefer/mir/usr-mir-window-placement |
Merge into: | lp:mir |
Diff against target: |
4936 lines (+1124/-660) 124 files modified
examples/client_touch_validator.cpp (+1/-1) examples/eglapp.c (+16/-16) examples/fingerpaint.c (+1/-1) examples/server_example_basic_window_manager.cpp (+2/-2) examples/server_example_basic_window_manager.h (+1/-1) examples/server_example_canonical_window_manager.cpp (+5/-5) examples/server_example_window_management_info.cpp (+35/-35) examples/server_example_window_management_info.h (+3/-3) examples/target.c (+1/-1) include/client/mir/event_printer.h (+7/-3) include/client/mir/events/event_builders.h (+3/-0) include/client/mir_toolkit/events/event.h (+59/-9) include/client/mir_toolkit/events/surface_event.h (+2/-0) include/client/mir_toolkit/events/window_event.h (+53/-0) include/client/mir_toolkit/events/window_output_event.h (+83/-0) include/client/mir_toolkit/events/window_placement.h (+47/-0) include/client/mir_toolkit/mir_surface.h (+10/-7) include/core/mir_toolkit/common.h (+36/-2) include/server/mir/scene/null_surface_observer.h (+1/-1) include/server/mir/scene/surface.h (+3/-3) include/server/mir/scene/surface_creation_parameters.h (+2/-2) include/server/mir/scene/surface_observer.h (+1/-1) include/server/mir/shell/abstract_shell.h (+2/-2) include/server/mir/shell/shell.h (+2/-2) include/server/mir/shell/shell_report.h (+1/-1) include/server/mir/shell/shell_wrapper.h (+2/-2) include/server/mir/shell/surface_specification.h (+1/-1) include/server/mir/shell/system_compositor_window_manager.h (+1/-1) include/server/mir/shell/window_manager.h (+1/-1) include/test/mir/test/doubles/mock_window_manager.h (+1/-1) include/test/mir/test/doubles/stub_surface.h (+3/-3) include/test/mir/test/event_matchers.h (+8/-7) src/client/buffer_stream.cpp (+3/-3) src/client/buffer_stream.h (+1/-1) src/client/event.cpp (+90/-15) src/client/event_printer.cpp (+52/-18) src/client/events/event_builders.cpp (+11/-0) src/client/mir_surface.cpp (+17/-17) src/client/mir_surface.h (+5/-5) src/client/mir_surface_api.cpp (+34/-29) src/client/rpc/mir_protobuf_rpc_channel.cpp (+4/-4) src/client/screencast_stream.cpp (+1/-1) src/client/screencast_stream.h (+1/-1) src/client/symbols.map (+12/-0) src/common/events/event.cpp (+8/-8) src/common/events/surface_event.cpp (+3/-3) src/include/client/mir/egl_native_surface.h (+1/-1) src/include/common/mir/events/event.h (+2/-2) src/include/common/mir/events/surface_event.h (+2/-2) src/include/common/mir/events/surface_output_event.h (+0/-2) src/include/server/mir/frontend/shell.h (+2/-2) src/include/server/mir/scene/surface_event_source.h (+1/-1) src/include/server/mir/scene/surface_observers.h (+1/-1) src/include/server/mir/shell/basic_window_manager.h (+1/-1) src/include/server/mir/shell/window_management_info.h (+3/-3) src/platforms/android/client/egl_native_surface_interpreter.cpp (+1/-1) src/platforms/mesa/client/native_surface.cpp (+1/-1) src/server/frontend/session_mediator.cpp (+4/-4) src/server/frontend/shell_wrapper.cpp (+2/-2) src/server/frontend/shell_wrapper.h (+2/-2) src/server/input/cursor_controller.cpp (+1/-1) src/server/report/logging/shell_report.cpp (+1/-1) src/server/report/logging/shell_report.h (+1/-1) src/server/report/null/shell_report.cpp (+1/-1) src/server/report/null/shell_report.h (+1/-1) src/server/scene/application_session.cpp (+12/-12) src/server/scene/basic_surface.cpp (+28/-28) src/server/scene/basic_surface.h (+5/-5) src/server/scene/legacy_surface_change_notification.cpp (+1/-1) src/server/scene/legacy_surface_change_notification.h (+1/-1) src/server/scene/null_surface_observer.cpp (+1/-1) src/server/scene/rendering_tracker.cpp (+1/-1) src/server/scene/surface_creation_parameters.cpp (+1/-1) src/server/scene/surface_event_source.cpp (+1/-1) src/server/scene/surface_stack.cpp (+1/-1) src/server/shell/abstract_shell.cpp (+4/-4) src/server/shell/basic_window_manager.cpp (+2/-2) src/server/shell/canonical_window_manager.cpp (+10/-10) src/server/shell/frontend_shell.cpp (+4/-4) src/server/shell/frontend_shell.h (+2/-2) src/server/shell/shell_wrapper.cpp (+2/-2) src/server/shell/system_compositor_window_manager.cpp (+1/-1) src/server/shell/window_management_info.cpp (+35/-35) src/utils/vanity.c (+6/-6) tests/acceptance-tests/test_client_cookie.cpp (+6/-6) tests/acceptance-tests/test_client_focus_notification.cpp (+5/-4) tests/acceptance-tests/test_client_input.cpp (+8/-8) tests/acceptance-tests/test_client_library.cpp (+2/-2) tests/acceptance-tests/test_client_surface_events.cpp (+74/-29) tests/acceptance-tests/test_client_surface_visibility.cpp (+5/-4) tests/acceptance-tests/test_client_surfaces.cpp (+5/-5) tests/acceptance-tests/test_confined_pointer.cpp (+7/-7) tests/acceptance-tests/test_custom_window_management.cpp (+8/-7) tests/acceptance-tests/test_nested_input.cpp (+8/-8) tests/acceptance-tests/test_nested_mir.cpp (+6/-6) tests/acceptance-tests/test_new_display_configuration.cpp (+5/-5) tests/acceptance-tests/test_surface_morphing.cpp (+22/-22) tests/acceptance-tests/test_surface_placement.cpp (+12/-12) tests/acceptance-tests/test_surface_raise.cpp (+6/-6) tests/acceptance-tests/test_surface_specification.cpp (+19/-19) tests/acceptance-tests/test_system_compositor_window_manager.cpp (+5/-5) tests/acceptance-tests/throwback/test_shell_control_of_surface_configuration.cpp (+6/-6) tests/include/mir/test/doubles/mock_egl_native_surface.h (+1/-1) tests/include/mir/test/doubles/mock_frontend_surface.h (+2/-2) tests/include/mir/test/doubles/mock_scene_session.h (+1/-1) tests/include/mir/test/doubles/mock_shell.h (+2/-2) tests/include/mir/test/doubles/mock_surface.h (+1/-1) tests/include/mir/test/doubles/stub_scene_surface.h (+3/-3) tests/integration-tests/client/test_mirsurface.cpp (+4/-4) tests/integration-tests/session_management.cpp (+1/-1) tests/integration-tests/test_session.cpp (+1/-1) tests/mir_test_framework/stub_surface.cpp (+4/-4) tests/mir_test_framework/visible_surface.cpp (+4/-3) tests/unit-tests/client/test_client_mir_surface.cpp (+10/-10) tests/unit-tests/frontend/test_event_sender.cpp (+1/-1) tests/unit-tests/platforms/android/client/test_egl_native_surface_interpreter.cpp (+3/-3) tests/unit-tests/platforms/mesa/client/test_native_surface.cpp (+2/-2) tests/unit-tests/scene/test_abstract_shell.cpp (+6/-6) tests/unit-tests/scene/test_application_session.cpp (+15/-15) tests/unit-tests/scene/test_basic_surface.cpp (+17/-17) tests/unit-tests/scene/test_rendering_tracker.cpp (+6/-6) tests/unit-tests/scene/test_surface.cpp (+1/-1) tests/unit-tests/scene/test_surface_impl.cpp (+35/-35) tests/unit-tests/scene/test_surface_stack.cpp (+13/-13) |
To merge this branch: | bzr merge lp:~brandontschaefer/mir/usr-mir-window-placement |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir development team | Pending | ||
Review via email: mp+314476@code.launchpad.net |
This proposal has been superseded by a proposal from 2017-01-10.
Commit message
Use MirWindowPlacem
Description of the change
Use MirWindowPlacem
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'examples/client_touch_validator.cpp' | |||
2 | --- examples/client_touch_validator.cpp 2017-01-09 06:48:47 +0000 | |||
3 | +++ examples/client_touch_validator.cpp 2017-01-10 20:52:04 +0000 | |||
4 | @@ -143,7 +143,7 @@ | |||
5 | 143 | case mir_event_type_input: | 143 | case mir_event_type_input: |
6 | 144 | on_input_event(state, mir_event_get_input_event(event)); | 144 | on_input_event(state, mir_event_get_input_event(event)); |
7 | 145 | break; | 145 | break; |
9 | 146 | case mir_event_type_close_surface: | 146 | case mir_event_type_close_window: |
10 | 147 | abort(); | 147 | abort(); |
11 | 148 | break; | 148 | break; |
12 | 149 | default: | 149 | default: |
13 | 150 | 150 | ||
14 | === modified file 'examples/eglapp.c' | |||
15 | --- examples/eglapp.c 2017-01-09 06:48:47 +0000 | |||
16 | +++ examples/eglapp.c 2017-01-10 20:52:04 +0000 | |||
17 | @@ -110,18 +110,18 @@ | |||
18 | 110 | running = 0; | 110 | running = 0; |
19 | 111 | } | 111 | } |
20 | 112 | 112 | ||
22 | 113 | static void mir_eglapp_handle_surface_event(MirSurfaceEvent const* sev) | 113 | static void mir_eglapp_handle_window_event(MirWindowEvent const* sev) |
23 | 114 | { | 114 | { |
26 | 115 | MirSurfaceAttrib attrib = mir_surface_event_get_attribute(sev); | 115 | MirWindowAttrib attrib = mir_window_event_get_attribute(sev); |
27 | 116 | int value = mir_surface_event_get_attribute_value(sev); | 116 | int value = mir_window_event_get_attribute_value(sev); |
28 | 117 | 117 | ||
29 | 118 | switch (attrib) | 118 | switch (attrib) |
30 | 119 | { | 119 | { |
32 | 120 | case mir_surface_attrib_visibility: | 120 | case mir_window_attrib_visibility: |
33 | 121 | printf("Window %s\n", value == mir_surface_visibility_exposed ? | 121 | printf("Window %s\n", value == mir_surface_visibility_exposed ? |
34 | 122 | "exposed" : "occluded"); | 122 | "exposed" : "occluded"); |
35 | 123 | break; | 123 | break; |
37 | 124 | case mir_surface_attrib_dpi: | 124 | case mir_window_attrib_dpi: |
38 | 125 | // value is still zero - never implemented. Deprecate? (LP: #1559831) | 125 | // value is still zero - never implemented. Deprecate? (LP: #1559831) |
39 | 126 | break; | 126 | break; |
40 | 127 | default: | 127 | default: |
41 | @@ -129,19 +129,19 @@ | |||
42 | 129 | } | 129 | } |
43 | 130 | } | 130 | } |
44 | 131 | 131 | ||
46 | 132 | static void handle_surface_output_event(MirSurfaceOutputEvent const* out) | 132 | static void handle_window_output_event(MirWindowOutputEvent const* out) |
47 | 133 | { | 133 | { |
48 | 134 | static char const* const form_factor_name[6] = | 134 | static char const* const form_factor_name[6] = |
49 | 135 | {"unknown", "phone", "tablet", "monitor", "TV", "projector"}; | 135 | {"unknown", "phone", "tablet", "monitor", "TV", "projector"}; |
51 | 136 | unsigned ff = mir_surface_output_event_get_form_factor(out); | 136 | unsigned ff = mir_window_output_event_get_form_factor(out); |
52 | 137 | char const* form_factor = (ff < 6) ? form_factor_name[ff] : "out-of-range"; | 137 | char const* form_factor = (ff < 6) ? form_factor_name[ff] : "out-of-range"; |
53 | 138 | 138 | ||
55 | 139 | refresh_rate = mir_surface_output_event_get_refresh_rate(out); | 139 | refresh_rate = mir_window_output_event_get_refresh_rate(out); |
56 | 140 | 140 | ||
57 | 141 | printf("Window is on output %u: %d DPI, scale %.1fx, %s form factor, %.2fHz\n", | 141 | printf("Window is on output %u: %d DPI, scale %.1fx, %s form factor, %.2fHz\n", |
61 | 142 | mir_surface_output_event_get_output_id(out), | 142 | mir_window_output_event_get_output_id(out), |
62 | 143 | mir_surface_output_event_get_dpi(out), | 143 | mir_window_output_event_get_dpi(out), |
63 | 144 | mir_surface_output_event_get_scale(out), | 144 | mir_window_output_event_get_scale(out), |
64 | 145 | form_factor, | 145 | form_factor, |
65 | 146 | refresh_rate); | 146 | refresh_rate); |
66 | 147 | } | 147 | } |
67 | @@ -161,11 +161,11 @@ | |||
68 | 161 | case mir_event_type_input: | 161 | case mir_event_type_input: |
69 | 162 | mir_eglapp_handle_input_event(mir_event_get_input_event(ev)); | 162 | mir_eglapp_handle_input_event(mir_event_get_input_event(ev)); |
70 | 163 | break; | 163 | break; |
73 | 164 | case mir_event_type_surface: | 164 | case mir_event_type_window: |
74 | 165 | mir_eglapp_handle_surface_event(mir_event_get_surface_event(ev)); | 165 | mir_eglapp_handle_window_event(mir_event_get_window_event(ev)); |
75 | 166 | break; | 166 | break; |
78 | 167 | case mir_event_type_surface_output: | 167 | case mir_event_type_window_output: |
79 | 168 | handle_surface_output_event(mir_event_get_surface_output_event(ev)); | 168 | handle_window_output_event(mir_event_get_window_output_event(ev)); |
80 | 169 | break; | 169 | break; |
81 | 170 | case mir_event_type_resize: | 170 | case mir_event_type_resize: |
82 | 171 | /* | 171 | /* |
83 | @@ -182,7 +182,7 @@ | |||
84 | 182 | mir_resize_event_get_height(resize)); | 182 | mir_resize_event_get_height(resize)); |
85 | 183 | } | 183 | } |
86 | 184 | break; | 184 | break; |
88 | 185 | case mir_event_type_close_surface: | 185 | case mir_event_type_close_window: |
89 | 186 | printf("Received close event from server.\n"); | 186 | printf("Received close event from server.\n"); |
90 | 187 | running = 0; | 187 | running = 0; |
91 | 188 | break; | 188 | break; |
92 | 189 | 189 | ||
93 | === modified file 'examples/fingerpaint.c' | |||
94 | --- examples/fingerpaint.c 2017-01-09 06:48:47 +0000 | |||
95 | +++ examples/fingerpaint.c 2017-01-10 20:52:04 +0000 | |||
96 | @@ -301,7 +301,7 @@ | |||
97 | 301 | changed = true; | 301 | changed = true; |
98 | 302 | } | 302 | } |
99 | 303 | } | 303 | } |
101 | 304 | else if (event_type == mir_event_type_close_surface) | 304 | else if (event_type == mir_event_type_close_window) |
102 | 305 | { | 305 | { |
103 | 306 | static int closing = 0; | 306 | static int closing = 0; |
104 | 307 | 307 | ||
105 | 308 | 308 | ||
106 | === modified file 'examples/server_example_basic_window_manager.cpp' | |||
107 | --- examples/server_example_basic_window_manager.cpp 2016-07-18 07:38:38 +0000 | |||
108 | +++ examples/server_example_basic_window_manager.cpp 2017-01-10 20:52:04 +0000 | |||
109 | @@ -139,13 +139,13 @@ | |||
110 | 139 | int me::BasicWindowManager::set_surface_attribute( | 139 | int me::BasicWindowManager::set_surface_attribute( |
111 | 140 | std::shared_ptr<scene::Session> const& /*session*/, | 140 | std::shared_ptr<scene::Session> const& /*session*/, |
112 | 141 | std::shared_ptr<scene::Surface> const& surface, | 141 | std::shared_ptr<scene::Surface> const& surface, |
114 | 142 | MirSurfaceAttrib attrib, | 142 | MirWindowAttrib attrib, |
115 | 143 | int value) | 143 | int value) |
116 | 144 | { | 144 | { |
117 | 145 | std::lock_guard<decltype(mutex)> lock(mutex); | 145 | std::lock_guard<decltype(mutex)> lock(mutex); |
118 | 146 | switch (attrib) | 146 | switch (attrib) |
119 | 147 | { | 147 | { |
121 | 148 | case mir_surface_attrib_state: | 148 | case mir_window_attrib_state: |
122 | 149 | { | 149 | { |
123 | 150 | auto const state = policy->handle_set_state(surface, MirSurfaceState(value)); | 150 | auto const state = policy->handle_set_state(surface, MirSurfaceState(value)); |
124 | 151 | return surface->configure(attrib, state); | 151 | return surface->configure(attrib, state); |
125 | 152 | 152 | ||
126 | === modified file 'examples/server_example_basic_window_manager.h' | |||
127 | --- examples/server_example_basic_window_manager.h 2016-07-18 07:38:38 +0000 | |||
128 | +++ examples/server_example_basic_window_manager.h 2017-01-10 20:52:04 +0000 | |||
129 | @@ -177,7 +177,7 @@ | |||
130 | 177 | int set_surface_attribute( | 177 | int set_surface_attribute( |
131 | 178 | std::shared_ptr<scene::Session> const& /*session*/, | 178 | std::shared_ptr<scene::Session> const& /*session*/, |
132 | 179 | std::shared_ptr<scene::Surface> const& surface, | 179 | std::shared_ptr<scene::Surface> const& surface, |
134 | 180 | MirSurfaceAttrib attrib, | 180 | MirWindowAttrib attrib, |
135 | 181 | int value) override; | 181 | int value) override; |
136 | 182 | 182 | ||
137 | 183 | auto find_session(std::function<bool(SessionInfo const& info)> const& predicate) | 183 | auto find_session(std::function<bool(SessionInfo const& info)> const& predicate) |
138 | 184 | 184 | ||
139 | === modified file 'examples/server_example_canonical_window_manager.cpp' | |||
140 | --- examples/server_example_canonical_window_manager.cpp 2016-12-09 02:54:31 +0000 | |||
141 | +++ examples/server_example_canonical_window_manager.cpp 2017-01-10 20:52:04 +0000 | |||
142 | @@ -100,7 +100,7 @@ | |||
143 | 100 | -> ms::SurfaceCreationParameters | 100 | -> ms::SurfaceCreationParameters |
144 | 101 | { | 101 | { |
145 | 102 | auto parameters = request_parameters; | 102 | auto parameters = request_parameters; |
147 | 103 | auto surf_type = parameters.type.is_set() ? parameters.type.value() : mir_surface_type_normal; | 103 | auto surf_type = parameters.type.is_set() ? parameters.type.value() : mir_window_type_normal; |
148 | 104 | bool const needs_titlebar = SurfaceInfo::needs_titlebar(surf_type); | 104 | bool const needs_titlebar = SurfaceInfo::needs_titlebar(surf_type); |
149 | 105 | 105 | ||
150 | 106 | if (needs_titlebar) | 106 | if (needs_titlebar) |
151 | @@ -260,7 +260,7 @@ | |||
152 | 260 | .of_pixel_format(format) | 260 | .of_pixel_format(format) |
153 | 261 | .of_buffer_usage(mir::graphics::BufferUsage::software) | 261 | .of_buffer_usage(mir::graphics::BufferUsage::software) |
154 | 262 | .of_position(titlebar_position_for_window(surface->top_left())) | 262 | .of_position(titlebar_position_for_window(surface->top_left())) |
156 | 263 | .of_type(mir_surface_type_gloss) | 263 | .of_type(mir_window_type_gloss) |
157 | 264 | .with_buffer_stream(stream_id); | 264 | .with_buffer_stream(stream_id); |
158 | 265 | auto id = build(session, params); | 265 | auto id = build(session, params); |
159 | 266 | auto titlebar = session->surface(id); | 266 | auto titlebar = session->surface(id); |
160 | @@ -342,7 +342,7 @@ | |||
161 | 342 | throw std::runtime_error("Target surface type requires parent"); | 342 | throw std::runtime_error("Target surface type requires parent"); |
162 | 343 | } | 343 | } |
163 | 344 | 344 | ||
165 | 345 | surface->configure(mir_surface_attrib_type, new_type); | 345 | surface->configure(mir_window_attrib_type, new_type); |
166 | 346 | } | 346 | } |
167 | 347 | 347 | ||
168 | 348 | #define COPY_IF_SET(field)\ | 348 | #define COPY_IF_SET(field)\ |
169 | @@ -414,7 +414,7 @@ | |||
170 | 414 | if (modifications.state.is_set()) | 414 | if (modifications.state.is_set()) |
171 | 415 | { | 415 | { |
172 | 416 | auto const state = handle_set_state(surface, modifications.state.value()); | 416 | auto const state = handle_set_state(surface, modifications.state.value()); |
174 | 417 | surface->configure(mir_surface_attrib_state, state); | 417 | surface->configure(mir_window_attrib_state, state); |
175 | 418 | } | 418 | } |
176 | 419 | 419 | ||
177 | 420 | if (modifications.confine_pointer.is_set()) | 420 | if (modifications.confine_pointer.is_set()) |
178 | @@ -823,7 +823,7 @@ | |||
179 | 823 | state = mir_surface_state_restored; | 823 | state = mir_surface_state_restored; |
180 | 824 | 824 | ||
181 | 825 | auto const value = handle_set_state(surface, MirSurfaceState(state)); | 825 | auto const value = handle_set_state(surface, MirSurfaceState(state)); |
183 | 826 | surface->configure(mir_surface_attrib_state, value); | 826 | surface->configure(mir_window_attrib_state, value); |
184 | 827 | } | 827 | } |
185 | 828 | } | 828 | } |
186 | 829 | 829 | ||
187 | 830 | 830 | ||
188 | === modified file 'examples/server_example_window_management_info.cpp' | |||
189 | --- examples/server_example_window_management_info.cpp 2016-11-04 17:12:59 +0000 | |||
190 | +++ examples/server_example_window_management_info.cpp 2017-01-10 20:52:04 +0000 | |||
191 | @@ -59,17 +59,17 @@ | |||
192 | 59 | { | 59 | { |
193 | 60 | switch (type) | 60 | switch (type) |
194 | 61 | { | 61 | { |
202 | 62 | case mir_surface_type_normal: /**< AKA "regular" */ | 62 | case mir_window_type_normal: /**< AKA "regular" */ |
203 | 63 | case mir_surface_type_utility: /**< AKA "floating" */ | 63 | case mir_window_type_utility: /**< AKA "floating" */ |
204 | 64 | case mir_surface_type_dialog: | 64 | case mir_window_type_dialog: |
205 | 65 | case mir_surface_type_satellite: /**< AKA "toolbox"/"toolbar" */ | 65 | case mir_window_type_satellite: /**< AKA "toolbox"/"toolbar" */ |
206 | 66 | case mir_surface_type_freestyle: | 66 | case mir_window_type_freestyle: |
207 | 67 | case mir_surface_type_menu: | 67 | case mir_window_type_menu: |
208 | 68 | case mir_surface_type_inputmethod: /**< AKA "OSK" or handwriting etc. */ | 68 | case mir_window_type_inputmethod: /**< AKA "OSK" or handwriting etc. */ |
209 | 69 | return true; | 69 | return true; |
210 | 70 | 70 | ||
213 | 71 | case mir_surface_type_gloss: | 71 | case mir_window_type_gloss: |
214 | 72 | case mir_surface_type_tip: /**< AKA "tooltip" */ | 72 | case mir_window_type_tip: /**< AKA "tooltip" */ |
215 | 73 | default: | 73 | default: |
216 | 74 | // Cannot have input focus | 74 | // Cannot have input focus |
217 | 75 | return false; | 75 | return false; |
218 | @@ -80,10 +80,10 @@ | |||
219 | 80 | { | 80 | { |
220 | 81 | switch (type) | 81 | switch (type) |
221 | 82 | { | 82 | { |
226 | 83 | case mir_surface_type_overlay:; | 83 | case mir_window_type_gloss:; |
227 | 84 | case mir_surface_type_inputmethod: | 84 | case mir_window_type_inputmethod: |
228 | 85 | case mir_surface_type_satellite: | 85 | case mir_window_type_satellite: |
229 | 86 | case mir_surface_type_tip: | 86 | case mir_window_type_tip: |
230 | 87 | return true; | 87 | return true; |
231 | 88 | 88 | ||
232 | 89 | default: | 89 | default: |
233 | @@ -91,19 +91,19 @@ | |||
234 | 91 | } | 91 | } |
235 | 92 | } | 92 | } |
236 | 93 | 93 | ||
238 | 94 | bool me::SurfaceInfo::can_morph_to(MirSurfaceType new_type) const | 94 | bool me::SurfaceInfo::can_morph_to(MirWindowType new_type) const |
239 | 95 | { | 95 | { |
240 | 96 | switch (new_type) | 96 | switch (new_type) |
241 | 97 | { | 97 | { |
245 | 98 | case mir_surface_type_normal: | 98 | case mir_window_type_normal: |
246 | 99 | case mir_surface_type_utility: | 99 | case mir_window_type_utility: |
247 | 100 | case mir_surface_type_satellite: | 100 | case mir_window_type_satellite: |
248 | 101 | switch (type) | 101 | switch (type) |
249 | 102 | { | 102 | { |
254 | 103 | case mir_surface_type_normal: | 103 | case mir_window_type_normal: |
255 | 104 | case mir_surface_type_utility: | 104 | case mir_window_type_utility: |
256 | 105 | case mir_surface_type_dialog: | 105 | case mir_window_type_dialog: |
257 | 106 | case mir_surface_type_satellite: | 106 | case mir_window_type_satellite: |
258 | 107 | return true; | 107 | return true; |
259 | 108 | 108 | ||
260 | 109 | default: | 109 | default: |
261 | @@ -111,14 +111,14 @@ | |||
262 | 111 | } | 111 | } |
263 | 112 | break; | 112 | break; |
264 | 113 | 113 | ||
266 | 114 | case mir_surface_type_dialog: | 114 | case mir_window_type_dialog: |
267 | 115 | switch (type) | 115 | switch (type) |
268 | 116 | { | 116 | { |
274 | 117 | case mir_surface_type_normal: | 117 | case mir_window_type_normal: |
275 | 118 | case mir_surface_type_utility: | 118 | case mir_window_type_utility: |
276 | 119 | case mir_surface_type_dialog: | 119 | case mir_window_type_dialog: |
277 | 120 | case mir_surface_type_popover: | 120 | case mir_window_type_popover: |
278 | 121 | case mir_surface_type_satellite: | 121 | case mir_window_type_satellite: |
279 | 122 | return true; | 122 | return true; |
280 | 123 | 123 | ||
281 | 124 | default: | 124 | default: |
282 | @@ -137,8 +137,8 @@ | |||
283 | 137 | { | 137 | { |
284 | 138 | switch (type) | 138 | switch (type) |
285 | 139 | { | 139 | { |
288 | 140 | case mir_surface_type_normal: | 140 | case mir_window_type_normal: |
289 | 141 | case mir_surface_type_utility: | 141 | case mir_window_type_utility: |
290 | 142 | return true; | 142 | return true; |
291 | 143 | 143 | ||
292 | 144 | default: | 144 | default: |
293 | @@ -356,15 +356,15 @@ | |||
294 | 356 | requested_size = new_size; | 356 | requested_size = new_size; |
295 | 357 | } | 357 | } |
296 | 358 | 358 | ||
298 | 359 | bool me::SurfaceInfo::needs_titlebar(MirSurfaceType type) | 359 | bool me::SurfaceInfo::needs_titlebar(MirWindowType type) |
299 | 360 | { | 360 | { |
300 | 361 | switch (type) | 361 | switch (type) |
301 | 362 | { | 362 | { |
307 | 363 | case mir_surface_type_freestyle: | 363 | case mir_window_type_freestyle: |
308 | 364 | case mir_surface_type_menu: | 364 | case mir_window_type_menu: |
309 | 365 | case mir_surface_type_inputmethod: | 365 | case mir_window_type_inputmethod: |
310 | 366 | case mir_surface_type_gloss: | 366 | case mir_window_type_gloss: |
311 | 367 | case mir_surface_type_tip: | 367 | case mir_window_type_tip: |
312 | 368 | // No decorations for these surface types | 368 | // No decorations for these surface types |
313 | 369 | return false; | 369 | return false; |
314 | 370 | default: | 370 | default: |
315 | 371 | 371 | ||
316 | === modified file 'examples/server_example_window_management_info.h' | |||
317 | --- examples/server_example_window_management_info.h 2016-11-04 17:12:59 +0000 | |||
318 | +++ examples/server_example_window_management_info.h 2017-01-10 20:52:04 +0000 | |||
319 | @@ -39,7 +39,7 @@ | |||
320 | 39 | 39 | ||
321 | 40 | bool can_be_active() const; | 40 | bool can_be_active() const; |
322 | 41 | 41 | ||
324 | 42 | bool can_morph_to(MirSurfaceType new_type) const; | 42 | bool can_morph_to(MirWindowType new_type) const; |
325 | 43 | 43 | ||
326 | 44 | bool must_have_parent() const; | 44 | bool must_have_parent() const; |
327 | 45 | 45 | ||
328 | @@ -47,7 +47,7 @@ | |||
329 | 47 | 47 | ||
330 | 48 | bool is_visible() const; | 48 | bool is_visible() const; |
331 | 49 | 49 | ||
333 | 50 | static bool needs_titlebar(MirSurfaceType type); | 50 | static bool needs_titlebar(MirWindowType type); |
334 | 51 | 51 | ||
335 | 52 | void constrain_resize( | 52 | void constrain_resize( |
336 | 53 | std::shared_ptr <scene::Surface> const& surface, | 53 | std::shared_ptr <scene::Surface> const& surface, |
337 | @@ -57,7 +57,7 @@ | |||
338 | 57 | const bool top_resize, | 57 | const bool top_resize, |
339 | 58 | geometry::Rectangle const& bounds) const; | 58 | geometry::Rectangle const& bounds) const; |
340 | 59 | 59 | ||
342 | 60 | MirSurfaceType type; | 60 | MirWindowType type; |
343 | 61 | MirSurfaceState state; | 61 | MirSurfaceState state; |
344 | 62 | geometry::Rectangle restore_rect; | 62 | geometry::Rectangle restore_rect; |
345 | 63 | std::weak_ptr <scene::Session> session; | 63 | std::weak_ptr <scene::Session> session; |
346 | 64 | 64 | ||
347 | === modified file 'examples/target.c' | |||
348 | --- examples/target.c 2017-01-09 06:48:47 +0000 | |||
349 | +++ examples/target.c 2017-01-10 20:52:04 +0000 | |||
350 | @@ -199,7 +199,7 @@ | |||
351 | 199 | case mir_event_type_resize: | 199 | case mir_event_type_resize: |
352 | 200 | state->resized = true; | 200 | state->resized = true; |
353 | 201 | break; | 201 | break; |
355 | 202 | case mir_event_type_close_surface: | 202 | case mir_event_type_close_window: |
356 | 203 | state->running = false; | 203 | state->running = false; |
357 | 204 | break; | 204 | break; |
358 | 205 | default: | 205 | default: |
359 | 206 | 206 | ||
360 | === modified file 'include/client/mir/event_printer.h' | |||
361 | --- include/client/mir/event_printer.h 2016-10-31 02:37:31 +0000 | |||
362 | +++ include/client/mir/event_printer.h 2017-01-10 20:52:04 +0000 | |||
363 | @@ -35,20 +35,24 @@ | |||
364 | 35 | std::ostream& operator<<(std::ostream& out, MirOrientation orientation); | 35 | std::ostream& operator<<(std::ostream& out, MirOrientation orientation); |
365 | 36 | 36 | ||
366 | 37 | std::ostream& operator<<(std::ostream& out, MirSurfaceAttrib attribute); | 37 | std::ostream& operator<<(std::ostream& out, MirSurfaceAttrib attribute); |
367 | 38 | /* __attribute__ ((deprecated("use << with MirWindowAttribute instead")); */ | ||
368 | 39 | std::ostream& operator<<(std::ostream& out, MirWindowAttrib attribute); | ||
369 | 38 | std::ostream& operator<<(std::ostream& out, MirSurfaceFocusState state); | 40 | std::ostream& operator<<(std::ostream& out, MirSurfaceFocusState state); |
370 | 39 | std::ostream& operator<<(std::ostream& out, MirSurfaceVisibility state); | 41 | std::ostream& operator<<(std::ostream& out, MirSurfaceVisibility state); |
371 | 40 | std::ostream& operator<<(std::ostream& out, MirSurfaceType type); | 42 | std::ostream& operator<<(std::ostream& out, MirSurfaceType type); |
372 | 43 | /* __attribute__ ((deprecated("use << with MirWindowType instead")); */ | ||
373 | 44 | std::ostream& operator<<(std::ostream& out, MirWindowType type); | ||
374 | 41 | std::ostream& operator<<(std::ostream& out, MirSurfaceState state); | 45 | std::ostream& operator<<(std::ostream& out, MirSurfaceState state); |
375 | 42 | 46 | ||
376 | 43 | std::ostream& operator<<(std::ostream& out, MirPromptSessionEvent const& event); | 47 | std::ostream& operator<<(std::ostream& out, MirPromptSessionEvent const& event); |
377 | 44 | std::ostream& operator<<(std::ostream& out, MirResizeEvent const& event); | 48 | std::ostream& operator<<(std::ostream& out, MirResizeEvent const& event); |
378 | 45 | std::ostream& operator<<(std::ostream& out, MirOrientationEvent const& event); | 49 | std::ostream& operator<<(std::ostream& out, MirOrientationEvent const& event); |
379 | 46 | std::ostream& operator<<(std::ostream& out, MirInputEvent const& event); | 50 | std::ostream& operator<<(std::ostream& out, MirInputEvent const& event); |
381 | 47 | std::ostream& operator<<(std::ostream& out, MirCloseSurfaceEvent const& event); | 51 | std::ostream& operator<<(std::ostream& out, MirCloseWindowEvent const& event); |
382 | 48 | std::ostream& operator<<(std::ostream& out, MirKeymapEvent const& event); | 52 | std::ostream& operator<<(std::ostream& out, MirKeymapEvent const& event); |
384 | 49 | std::ostream& operator<<(std::ostream& out, MirSurfaceEvent const& event); | 53 | std::ostream& operator<<(std::ostream& out, MirWindowEvent const& event); |
385 | 50 | std::ostream& operator<<(std::ostream& out, MirInputDeviceStateEvent const& event); | 54 | std::ostream& operator<<(std::ostream& out, MirInputDeviceStateEvent const& event); |
387 | 51 | std::ostream& operator<<(std::ostream& out, MirSurfacePlacementEvent const& event); | 55 | std::ostream& operator<<(std::ostream& out, MirWindowPlacementEvent const& event); |
388 | 52 | std::ostream& operator<<(std::ostream& out, MirEvent const& event); | 56 | std::ostream& operator<<(std::ostream& out, MirEvent const& event); |
389 | 53 | 57 | ||
390 | 54 | } | 58 | } |
391 | 55 | 59 | ||
392 | === modified file 'include/client/mir/events/event_builders.h' | |||
393 | --- include/client/mir/events/event_builders.h 2016-11-11 07:56:09 +0000 | |||
394 | +++ include/client/mir/events/event_builders.h 2017-01-10 20:52:04 +0000 | |||
395 | @@ -48,6 +48,9 @@ | |||
396 | 48 | EventUPtr make_event(frontend::SurfaceId const& surface_id, geometry::Size const& size); | 48 | EventUPtr make_event(frontend::SurfaceId const& surface_id, geometry::Size const& size); |
397 | 49 | // Surface configure event | 49 | // Surface configure event |
398 | 50 | EventUPtr make_event(frontend::SurfaceId const& surface_id, MirSurfaceAttrib attribute, int value); | 50 | EventUPtr make_event(frontend::SurfaceId const& surface_id, MirSurfaceAttrib attribute, int value); |
399 | 51 | /* __attribute__ ((deprecated("use make_event with MirWindowAttribute instead")); */ | ||
400 | 52 | // Window configure event | ||
401 | 53 | EventUPtr make_event(frontend::SurfaceId const& surface_id, MirWindowAttrib attribute, int value); | ||
402 | 51 | // Close surface event | 54 | // Close surface event |
403 | 52 | EventUPtr make_event(frontend::SurfaceId const& surface_id); | 55 | EventUPtr make_event(frontend::SurfaceId const& surface_id); |
404 | 53 | // Keymap event | 56 | // Keymap event |
405 | 54 | 57 | ||
406 | === modified file 'include/client/mir_toolkit/events/event.h' | |||
407 | --- include/client/mir_toolkit/events/event.h 2016-11-11 07:56:09 +0000 | |||
408 | +++ include/client/mir_toolkit/events/event.h 2017-01-10 20:52:04 +0000 | |||
409 | @@ -1,5 +1,5 @@ | |||
410 | 1 | /* | 1 | /* |
412 | 2 | * Copyright © 2014-2016 Canonical Ltd. | 2 | * Copyright © 2014-2017 Canonical Ltd. |
413 | 3 | * | 3 | * |
414 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
415 | 5 | * under the terms of the GNU Lesser General Public License version 3, | 5 | * under the terms of the GNU Lesser General Public License version 3, |
416 | @@ -31,36 +31,47 @@ | |||
417 | 31 | extern "C" { | 31 | extern "C" { |
418 | 32 | #endif | 32 | #endif |
419 | 33 | 33 | ||
420 | 34 | #pragma GCC diagnostic push | ||
421 | 35 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
422 | 34 | typedef enum | 36 | typedef enum |
423 | 35 | { | 37 | { |
424 | 36 | mir_event_type_key, | 38 | mir_event_type_key, |
425 | 37 | mir_event_type_motion, | 39 | mir_event_type_motion, |
427 | 38 | mir_event_type_surface, | 40 | mir_event_type_surface, /* __attribute__ ((deprecated("use mir_event_type_window instead"))), */ |
428 | 41 | mir_event_type_window = mir_event_type_surface, | ||
429 | 39 | mir_event_type_resize, | 42 | mir_event_type_resize, |
430 | 40 | mir_event_type_prompt_session_state_change, | 43 | mir_event_type_prompt_session_state_change, |
431 | 41 | mir_event_type_orientation, | 44 | mir_event_type_orientation, |
433 | 42 | mir_event_type_close_surface, | 45 | mir_event_type_close_surface, /*__attribute__ ((deprecated("use mir_event_type_close_window instead"))), */ |
434 | 46 | mir_event_type_close_window = mir_event_type_close_surface, | ||
435 | 43 | /* Type for new style input event will be returned from mir_event_get_type | 47 | /* Type for new style input event will be returned from mir_event_get_type |
436 | 44 | when old style event type was mir_event_type_key or mir_event_type_motion */ | 48 | when old style event type was mir_event_type_key or mir_event_type_motion */ |
437 | 45 | mir_event_type_input, | 49 | mir_event_type_input, |
438 | 46 | mir_event_type_keymap, | 50 | mir_event_type_keymap, |
439 | 47 | mir_event_type_input_configuration, | 51 | mir_event_type_input_configuration, |
441 | 48 | mir_event_type_surface_output, | 52 | mir_event_type_surface_output, /* __attribute__ ((deprecated("use mir_event_type_window_output instead"))), */ |
442 | 53 | mir_event_type_window_output = mir_event_type_surface_output, | ||
443 | 49 | mir_event_type_input_device_state, | 54 | mir_event_type_input_device_state, |
445 | 50 | mir_event_type_surface_placement, | 55 | mir_event_type_surface_placement, /*__attribute__ ((deprecated("use mir_event_type_window_placement instead"))), */ |
446 | 56 | mir_event_type_window_placement = mir_event_type_surface_placement, | ||
447 | 51 | } MirEventType; | 57 | } MirEventType; |
448 | 58 | #pragma GCC diagnostic pop | ||
449 | 52 | 59 | ||
451 | 53 | typedef struct MirSurfaceEvent MirSurfaceEvent; | 60 | typedef struct MirSurfaceEvent MirSurfaceEvent; /* __attribute__ ((deprecated("use MirWindowEvent instead"))); */ |
452 | 61 | typedef struct MirSurfaceEvent MirWindowEvent; | ||
453 | 54 | typedef struct MirResizeEvent MirResizeEvent; | 62 | typedef struct MirResizeEvent MirResizeEvent; |
454 | 55 | typedef struct MirPromptSessionEvent MirPromptSessionEvent; | 63 | typedef struct MirPromptSessionEvent MirPromptSessionEvent; |
455 | 56 | typedef struct MirOrientationEvent MirOrientationEvent; | 64 | typedef struct MirOrientationEvent MirOrientationEvent; |
457 | 57 | typedef struct MirCloseSurfaceEvent MirCloseSurfaceEvent; | 65 | typedef struct MirCloseSurfaceEvent MirCloseSurfaceEvent; /* __attribute__ ((deprecated("use MirCloseWindowEvent instead"))); */ |
458 | 66 | typedef struct MirCloseSurfaceEvent MirCloseWindowEvent; | ||
459 | 58 | typedef struct MirInputEvent MirInputEvent; | 67 | typedef struct MirInputEvent MirInputEvent; |
460 | 59 | typedef struct MirKeymapEvent MirKeymapEvent; | 68 | typedef struct MirKeymapEvent MirKeymapEvent; |
461 | 60 | typedef struct MirInputConfigurationEvent MirInputConfigurationEvent; | 69 | typedef struct MirInputConfigurationEvent MirInputConfigurationEvent; |
463 | 61 | typedef struct MirSurfaceOutputEvent MirSurfaceOutputEvent; | 70 | typedef struct MirSurfaceOutputEvent MirSurfaceOutputEvent; /* __attribute__ ((deprecated("use MirWindowOutputEvent instead"))); */ |
464 | 71 | typedef struct MirSurfaceOutputEvent MirWindowOutputEvent; | ||
465 | 62 | typedef struct MirInputDeviceStateEvent MirInputDeviceStateEvent; | 72 | typedef struct MirInputDeviceStateEvent MirInputDeviceStateEvent; |
467 | 63 | typedef struct MirSurfacePlacementEvent MirSurfacePlacementEvent; | 73 | typedef struct MirSurfacePlacementEvent MirSurfacePlacementEvent; /* __attribute__ ((deprecated("use MirWindowPlacementEvent instead"))); */ |
468 | 74 | typedef struct MirSurfacePlacementEvent MirWindowPlacementEvent; | ||
469 | 64 | 75 | ||
470 | 65 | typedef struct MirCookie MirCookie; | 76 | typedef struct MirCookie MirCookie; |
471 | 66 | 77 | ||
472 | @@ -74,11 +85,13 @@ | |||
473 | 74 | #include "mir_toolkit/events/input/input_event.h" | 85 | #include "mir_toolkit/events/input/input_event.h" |
474 | 75 | #include "mir_toolkit/events/resize_event.h" | 86 | #include "mir_toolkit/events/resize_event.h" |
475 | 76 | #include "mir_toolkit/events/surface_event.h" | 87 | #include "mir_toolkit/events/surface_event.h" |
476 | 88 | #include "mir_toolkit/events/window_event.h" | ||
477 | 77 | #include "mir_toolkit/events/orientation_event.h" | 89 | #include "mir_toolkit/events/orientation_event.h" |
478 | 78 | #include "mir_toolkit/events/prompt_session_event.h" | 90 | #include "mir_toolkit/events/prompt_session_event.h" |
479 | 79 | #include "mir_toolkit/events/keymap_event.h" | 91 | #include "mir_toolkit/events/keymap_event.h" |
480 | 80 | #include "mir_toolkit/events/input_configuration_event.h" | 92 | #include "mir_toolkit/events/input_configuration_event.h" |
481 | 81 | #include "mir_toolkit/events/surface_output_event.h" | 93 | #include "mir_toolkit/events/surface_output_event.h" |
482 | 94 | #include "mir_toolkit/events/window_output_event.h" | ||
483 | 82 | #include "mir_toolkit/events/input_device_state_event.h" | 95 | #include "mir_toolkit/events/input_device_state_event.h" |
484 | 83 | 96 | ||
485 | 84 | #ifdef __cplusplus | 97 | #ifdef __cplusplus |
486 | @@ -118,6 +131,17 @@ | |||
487 | 118 | * \return The associated MirSurfaceEvent | 131 | * \return The associated MirSurfaceEvent |
488 | 119 | */ | 132 | */ |
489 | 120 | MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* event); | 133 | MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* event); |
490 | 134 | /* __attribute__ ((deprecated("use mir_event_get_window_event instead"))); */ | ||
491 | 135 | |||
492 | 136 | /** | ||
493 | 137 | * Retrieve the MirWindowEvent associated with a MirEvent of | ||
494 | 138 | * type mir_event_type_window. See <mir_toolkit/events/surface_event.h> | ||
495 | 139 | * for accessors. | ||
496 | 140 | * | ||
497 | 141 | * \param [in] event The event | ||
498 | 142 | * \return The associated MirWindowEvent | ||
499 | 143 | */ | ||
500 | 144 | MirWindowEvent const* mir_event_get_window_event(MirEvent const* event); | ||
501 | 121 | 145 | ||
502 | 122 | /** | 146 | /** |
503 | 123 | * Retrieve the MirResizeEvent associated with a MirEvent of | 147 | * Retrieve the MirResizeEvent associated with a MirEvent of |
504 | @@ -206,6 +230,22 @@ | |||
505 | 206 | * \return The associated MirSurfaceOutputEvent | 230 | * \return The associated MirSurfaceOutputEvent |
506 | 207 | */ | 231 | */ |
507 | 208 | MirSurfaceOutputEvent const* mir_event_get_surface_output_event(MirEvent const* event); | 232 | MirSurfaceOutputEvent const* mir_event_get_surface_output_event(MirEvent const* event); |
508 | 233 | /* __attribute__((deprecated("use mir_event_get_window_output_event))) */ | ||
509 | 234 | |||
510 | 235 | /** | ||
511 | 236 | * Retrieve the MirWindowOutputEvent associated with a MirEvent of type | ||
512 | 237 | * mir_event_type_window_output. The event signifies that the properties | ||
513 | 238 | * of the output the window is displayed upon have changed. | ||
514 | 239 | * | ||
515 | 240 | * A MirWindowOutputEvent is generated either when the properties of the | ||
516 | 241 | * output the window is primarily on change (for example: by user configuration | ||
517 | 242 | * of resolution) or when the output the window is primarily on changes | ||
518 | 243 | * (for example: when a user moves the window from one monitor to another). | ||
519 | 244 | * | ||
520 | 245 | * \param [in] event The event | ||
521 | 246 | * \return The associated MirWindowOutputEvent | ||
522 | 247 | */ | ||
523 | 248 | MirWindowOutputEvent const* mir_event_get_window_output_event(MirEvent const* event); | ||
524 | 209 | 249 | ||
525 | 210 | /** | 250 | /** |
526 | 211 | * Retrieve the MirInputDeviceStateEvent associated with a MirEvent of | 251 | * Retrieve the MirInputDeviceStateEvent associated with a MirEvent of |
527 | @@ -228,6 +268,16 @@ | |||
528 | 228 | */ | 268 | */ |
529 | 229 | MirSurfacePlacementEvent const* mir_event_get_surface_placement_event(MirEvent const* event); | 269 | MirSurfacePlacementEvent const* mir_event_get_surface_placement_event(MirEvent const* event); |
530 | 230 | 270 | ||
531 | 271 | /** | ||
532 | 272 | * Retrieve the MirWindowPlacementEvent associated with a MirEvent of | ||
533 | 273 | * type mir_event_type_window_placement. The event signifies that the | ||
534 | 274 | * the server has fulfilled a request for relative window placement. | ||
535 | 275 | * | ||
536 | 276 | * \param [in] event The event | ||
537 | 277 | * \return The associated MirWindowPlacementEvent | ||
538 | 278 | */ | ||
539 | 279 | MirWindowPlacementEvent const* mir_event_get_window_placement_event(MirEvent const* event); | ||
540 | 280 | |||
541 | 231 | /* | 281 | /* |
542 | 232 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 282 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
543 | 233 | * _________________________ | 283 | * _________________________ |
544 | 234 | 284 | ||
545 | === modified file 'include/client/mir_toolkit/events/surface_event.h' | |||
546 | --- include/client/mir_toolkit/events/surface_event.h 2016-10-12 06:03:15 +0000 | |||
547 | +++ include/client/mir_toolkit/events/surface_event.h 2017-01-10 20:52:04 +0000 | |||
548 | @@ -36,6 +36,7 @@ | |||
549 | 36 | * \return The associated attribute | 36 | * \return The associated attribute |
550 | 37 | */ | 37 | */ |
551 | 38 | MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* event); | 38 | MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* event); |
552 | 39 | /* __attribute__ ((deprecated("use make_event with mir_window_event_get_attribute instead"))); */ | ||
553 | 39 | 40 | ||
554 | 40 | /** | 41 | /** |
555 | 41 | * Retrieve the new value of the associated attribute for a given MirSurfaceEvent | 42 | * Retrieve the new value of the associated attribute for a given MirSurfaceEvent |
556 | @@ -44,6 +45,7 @@ | |||
557 | 44 | * \return The associated attribute value | 45 | * \return The associated attribute value |
558 | 45 | */ | 46 | */ |
559 | 46 | int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event); | 47 | int mir_surface_event_get_attribute_value(MirSurfaceEvent const* event); |
560 | 48 | /* __attribute__ ((deprecated("use make_event with mir_window_event_get_attribute_value instead"))); */ | ||
561 | 47 | 49 | ||
562 | 48 | #ifdef __cplusplus | 50 | #ifdef __cplusplus |
563 | 49 | } | 51 | } |
564 | 50 | 52 | ||
565 | === added file 'include/client/mir_toolkit/events/window_event.h' | |||
566 | --- include/client/mir_toolkit/events/window_event.h 1970-01-01 00:00:00 +0000 | |||
567 | +++ include/client/mir_toolkit/events/window_event.h 2017-01-10 20:52:04 +0000 | |||
568 | @@ -0,0 +1,53 @@ | |||
569 | 1 | /* | ||
570 | 2 | * Copyright © 2017 Canonical Ltd. | ||
571 | 3 | * | ||
572 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
573 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
574 | 6 | * as published by the Free Software Foundation. | ||
575 | 7 | * | ||
576 | 8 | * This program is distributed in the hope that it will be useful, | ||
577 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
578 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
579 | 11 | * GNU Lesser General Public License for more details. | ||
580 | 12 | * | ||
581 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
582 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
583 | 15 | * | ||
584 | 16 | * Authored by: Brandon Schaefer <brandon.schaefer@canonical.com> | ||
585 | 17 | */ | ||
586 | 18 | |||
587 | 19 | #ifndef MIR_TOOLKIT_EVENTS_WINDOW_EVENT_H_ | ||
588 | 20 | #define MIR_TOOLKIT_EVENTS_WINDOW_EVENT_H_ | ||
589 | 21 | |||
590 | 22 | #include <mir_toolkit/events/event.h> | ||
591 | 23 | |||
592 | 24 | #ifdef __cplusplus | ||
593 | 25 | /** | ||
594 | 26 | * \addtogroup mir_toolkit | ||
595 | 27 | * @{ | ||
596 | 28 | */ | ||
597 | 29 | extern "C" { | ||
598 | 30 | #endif | ||
599 | 31 | |||
600 | 32 | /** | ||
601 | 33 | * Retrieve the attribute index configured with a given MirWindowEvent | ||
602 | 34 | * | ||
603 | 35 | * \param [in] event The event | ||
604 | 36 | * \return The associated attribute | ||
605 | 37 | */ | ||
606 | 38 | MirWindowAttrib mir_window_event_get_attribute(MirWindowEvent const* event); | ||
607 | 39 | |||
608 | 40 | /** | ||
609 | 41 | * Retrieve the new value of the associated attribute for a given MirWindowEvent | ||
610 | 42 | * | ||
611 | 43 | * \param [in] event The event | ||
612 | 44 | * \return The associated attribute value | ||
613 | 45 | */ | ||
614 | 46 | int mir_window_event_get_attribute_value(MirWindowEvent const* event); | ||
615 | 47 | |||
616 | 48 | #ifdef __cplusplus | ||
617 | 49 | } | ||
618 | 50 | /**@}*/ | ||
619 | 51 | #endif | ||
620 | 52 | |||
621 | 53 | #endif /* MIR_TOOLKIT_WINDOW_EVENT_H_ */ | ||
622 | 0 | 54 | ||
623 | === added file 'include/client/mir_toolkit/events/window_output_event.h' | |||
624 | --- include/client/mir_toolkit/events/window_output_event.h 1970-01-01 00:00:00 +0000 | |||
625 | +++ include/client/mir_toolkit/events/window_output_event.h 2017-01-10 20:52:04 +0000 | |||
626 | @@ -0,0 +1,83 @@ | |||
627 | 1 | /* | ||
628 | 2 | * Copyright © 2017 Canonical Ltd. | ||
629 | 3 | * | ||
630 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
631 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
632 | 6 | * as published by the Free Software Foundation. | ||
633 | 7 | * | ||
634 | 8 | * This program is distributed in the hope that it will be useful, | ||
635 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
636 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
637 | 11 | * GNU Lesser General Public License for more details. | ||
638 | 12 | * | ||
639 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
640 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
641 | 15 | * | ||
642 | 16 | * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> | ||
643 | 17 | * | ||
644 | 18 | */ | ||
645 | 19 | |||
646 | 20 | #ifndef MIR_TOOLKIT_WINDOW_OUTPUT_EVENT_H_ | ||
647 | 21 | #define MIR_TOOLKIT_WINDOW_OUTPUT_EVENT_H_ | ||
648 | 22 | |||
649 | 23 | #include <mir_toolkit/events/event.h> | ||
650 | 24 | |||
651 | 25 | #ifdef __cplusplus | ||
652 | 26 | /** | ||
653 | 27 | * \addtogroup mir_toolkit | ||
654 | 28 | * @{ | ||
655 | 29 | */ | ||
656 | 30 | extern "C" { | ||
657 | 31 | #endif | ||
658 | 32 | |||
659 | 33 | /** | ||
660 | 34 | * Retrieve the DPI of the new output configuration of a MirWindowOutputEvent | ||
661 | 35 | * | ||
662 | 36 | * \param [in] ev The event | ||
663 | 37 | * \return The new DPI value for the window is primarily on. | ||
664 | 38 | */ | ||
665 | 39 | int mir_window_output_event_get_dpi(MirWindowOutputEvent const* ev); | ||
666 | 40 | |||
667 | 41 | /** | ||
668 | 42 | * Retrieve the form factor of the new output configuration of a MirWindowOutputEvent | ||
669 | 43 | * | ||
670 | 44 | * \param [in] ev The event | ||
671 | 45 | * \return The new form factor of the output the window is primarily on. | ||
672 | 46 | */ | ||
673 | 47 | MirFormFactor mir_window_output_event_get_form_factor(MirWindowOutputEvent const* ev); | ||
674 | 48 | |||
675 | 49 | /** | ||
676 | 50 | * Retrieve the suggested scaling factor of the new output configuration of a | ||
677 | 51 | * MirWindowOutputEvent. | ||
678 | 52 | * | ||
679 | 53 | * \param [in] ev The event | ||
680 | 54 | * \return The new scaling factor of the output the window is primarily on. | ||
681 | 55 | */ | ||
682 | 56 | float mir_window_output_event_get_scale(MirWindowOutputEvent const* ev); | ||
683 | 57 | |||
684 | 58 | /** | ||
685 | 59 | * Retrieve the maximum refresh rate of the output(s) associated with a | ||
686 | 60 | * MirWindowOutputEvent. For variable refresh rate displays this represents | ||
687 | 61 | * the maximum refresh rate of the display to aim for, rather than a measurement | ||
688 | 62 | * of recent performance. | ||
689 | 63 | * | ||
690 | 64 | * \param [in] ev The event | ||
691 | 65 | * \return The refresh rate in Hz | ||
692 | 66 | */ | ||
693 | 67 | double mir_window_output_event_get_refresh_rate(MirWindowOutputEvent const* ev); | ||
694 | 68 | |||
695 | 69 | /** | ||
696 | 70 | * Retrieve the ID of the output this window is on from a MirWindowOutputEvent | ||
697 | 71 | * | ||
698 | 72 | * \param [in] ev The event | ||
699 | 73 | * \return The ID of the output the window is currently considered to be on. | ||
700 | 74 | * (From MirDisplayOutput::output_id) | ||
701 | 75 | */ | ||
702 | 76 | uint32_t mir_window_output_event_get_output_id(MirWindowOutputEvent const *ev); | ||
703 | 77 | |||
704 | 78 | #ifdef __cplusplus | ||
705 | 79 | } | ||
706 | 80 | /**@}*/ | ||
707 | 81 | #endif | ||
708 | 82 | |||
709 | 83 | #endif //MIR_TOOLKIT_WINDOW_OUTPUT_EVENT_H_ | ||
710 | 0 | 84 | ||
711 | === added file 'include/client/mir_toolkit/events/window_placement.h' | |||
712 | --- include/client/mir_toolkit/events/window_placement.h 1970-01-01 00:00:00 +0000 | |||
713 | +++ include/client/mir_toolkit/events/window_placement.h 2017-01-10 20:52:04 +0000 | |||
714 | @@ -0,0 +1,47 @@ | |||
715 | 1 | /* | ||
716 | 2 | * Copyright © 2017 Canonical Ltd. | ||
717 | 3 | * | ||
718 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
719 | 5 | * under the terms of the GNU Lesser General Public License version 3, | ||
720 | 6 | * as published by the Free Software Foundation. | ||
721 | 7 | * | ||
722 | 8 | * This program is distributed in the hope that it will be useful, | ||
723 | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
724 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
725 | 11 | * GNU Lesser General Public License for more details. | ||
726 | 12 | * | ||
727 | 13 | * You should have received a copy of the GNU Lesser General Public License | ||
728 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
729 | 15 | * | ||
730 | 16 | * Authored by: Alan Griffiths <alan@octopull.co.uk> | ||
731 | 17 | */ | ||
732 | 18 | |||
733 | 19 | #ifndef MIR_TOOLKIT_WINDOW_PLACEMENT_H_ | ||
734 | 20 | #define MIR_TOOLKIT_WINDOW_PLACEMENT_H_ | ||
735 | 21 | |||
736 | 22 | #include <mir_toolkit/client_types.h> | ||
737 | 23 | |||
738 | 24 | #ifdef __cplusplus | ||
739 | 25 | /** | ||
740 | 26 | * \addtogroup mir_toolkit | ||
741 | 27 | * @{ | ||
742 | 28 | */ | ||
743 | 29 | extern "C" { | ||
744 | 30 | #endif | ||
745 | 31 | |||
746 | 32 | typedef struct MirSurfacePlacementEvent MirWindowPlacementEvent; | ||
747 | 33 | |||
748 | 34 | /** | ||
749 | 35 | * Retrieve the relative position from a placement notification | ||
750 | 36 | * | ||
751 | 37 | * \param [in] event The placement event | ||
752 | 38 | * \return The position relative to the parent window | ||
753 | 39 | */ | ||
754 | 40 | MirRectangle mir_window_placement_get_relative_position(MirWindowPlacementEvent const* event); | ||
755 | 41 | |||
756 | 42 | #ifdef __cplusplus | ||
757 | 43 | } | ||
758 | 44 | /**@}*/ | ||
759 | 45 | #endif | ||
760 | 46 | |||
761 | 47 | #endif //MIR_TOOLKIT_WINDOW_PLACEMENT_H_ | ||
762 | 0 | 48 | ||
763 | === modified file 'include/client/mir_toolkit/mir_surface.h' | |||
764 | --- include/client/mir_toolkit/mir_surface.h 2017-01-09 06:48:47 +0000 | |||
765 | +++ include/client/mir_toolkit/mir_surface.h 2017-01-10 20:52:04 +0000 | |||
766 | @@ -208,7 +208,7 @@ | |||
767 | 208 | * \param [in] spec Specification to mutate | 208 | * \param [in] spec Specification to mutate |
768 | 209 | * \param [in] type the target type of the window | 209 | * \param [in] type the target type of the window |
769 | 210 | */ | 210 | */ |
771 | 211 | void mir_window_spec_set_type(MirWindowSpec* spec, MirSurfaceType type); | 211 | void mir_window_spec_set_type(MirWindowSpec* spec, MirWindowType type); |
772 | 212 | 212 | ||
773 | 213 | /** | 213 | /** |
774 | 214 | * Set the requested name. | 214 | * Set the requested name. |
775 | @@ -667,6 +667,13 @@ | |||
776 | 667 | */ | 667 | */ |
777 | 668 | void mir_window_raise(MirWindow* window, MirCookie const* cookie); | 668 | void mir_window_raise(MirWindow* window, MirCookie const* cookie); |
778 | 669 | 669 | ||
779 | 670 | /** | ||
780 | 671 | * Get the type (purpose) of a window. | ||
781 | 672 | * \param [in] window The window to query | ||
782 | 673 | * \return The type of the window | ||
783 | 674 | */ | ||
784 | 675 | MirWindowType mir_window_get_type(MirWindow* window); | ||
785 | 676 | |||
786 | 670 | // Functions in this pragma section are to be deprecated | 677 | // Functions in this pragma section are to be deprecated |
787 | 671 | //#pragma GCC diagnostic push | 678 | //#pragma GCC diagnostic push |
788 | 672 | //#pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 679 | //#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
789 | @@ -870,12 +877,8 @@ | |||
790 | 870 | void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters); | 877 | void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters); |
791 | 871 | //__attribute__((deprecated("use mir_window_get_parameters() instead"))); | 878 | //__attribute__((deprecated("use mir_window_get_parameters() instead"))); |
792 | 872 | 879 | ||
799 | 873 | /** | 880 | MirSurfaceType mir_surface_get_type(MirSurface* surface); |
800 | 874 | * Get the type (purpose) of a surface. | 881 | //__attribute__((deprecated("use mir_window_get_type() instead"))); |
795 | 875 | * \param [in] surface The surface to query | ||
796 | 876 | * \return The type of the surface | ||
797 | 877 | */ | ||
798 | 878 | MirSurfaceType mir_surface_get_type(MirSurface *surface); | ||
801 | 879 | 882 | ||
802 | 880 | /** | 883 | /** |
803 | 881 | * Change the state of a surface. | 884 | * Change the state of a surface. |
804 | 882 | 885 | ||
805 | === modified file 'include/core/mir_toolkit/common.h' | |||
806 | --- include/core/mir_toolkit/common.h 2016-11-11 07:56:09 +0000 | |||
807 | +++ include/core/mir_toolkit/common.h 2017-01-10 20:52:04 +0000 | |||
808 | @@ -43,7 +43,25 @@ | |||
809 | 43 | mir_surface_attrib_preferred_orientation, | 43 | mir_surface_attrib_preferred_orientation, |
810 | 44 | /* Must be last */ | 44 | /* Must be last */ |
811 | 45 | mir_surface_attribs | 45 | mir_surface_attribs |
813 | 46 | } MirSurfaceAttrib; | 46 | } MirSurfaceAttrib; /* __attribute__ ((deprecated("use MirWindowAttrib"))); */ |
814 | 47 | |||
815 | 48 | /** | ||
816 | 49 | * Attributes of a window that the client and server/shell may wish to | ||
817 | 50 | * get or set over the wire. | ||
818 | 51 | */ | ||
819 | 52 | typedef enum MirWindowAttrib | ||
820 | 53 | { | ||
821 | 54 | /* Do not specify values...code relies on 0...N ordering. */ | ||
822 | 55 | mir_window_attrib_type, | ||
823 | 56 | mir_window_attrib_state, | ||
824 | 57 | mir_window_attrib_swapinterval, | ||
825 | 58 | mir_window_attrib_focus, | ||
826 | 59 | mir_window_attrib_dpi, | ||
827 | 60 | mir_window_attrib_visibility, | ||
828 | 61 | mir_window_attrib_preferred_orientation, | ||
829 | 62 | /* Must be last */ | ||
830 | 63 | mir_window_attribs | ||
831 | 64 | } MirWindowAttrib; | ||
832 | 47 | 65 | ||
833 | 48 | typedef enum MirSurfaceType | 66 | typedef enum MirSurfaceType |
834 | 49 | { | 67 | { |
835 | @@ -59,7 +77,23 @@ | |||
836 | 59 | mir_surface_type_satellite, /**< AKA "toolbox"/"toolbar" */ | 77 | mir_surface_type_satellite, /**< AKA "toolbox"/"toolbar" */ |
837 | 60 | mir_surface_type_tip, /**< AKA "tooltip" */ | 78 | mir_surface_type_tip, /**< AKA "tooltip" */ |
838 | 61 | mir_surface_types | 79 | mir_surface_types |
840 | 62 | } MirSurfaceType; | 80 | } MirSurfaceType; /* __attribute__ ((deprecated("use MirWindowType"))); */ |
841 | 81 | |||
842 | 82 | typedef enum MirWindowType | ||
843 | 83 | { | ||
844 | 84 | mir_window_type_normal, /**< AKA "regular" */ | ||
845 | 85 | mir_window_type_utility, /**< AKA "floating" */ | ||
846 | 86 | mir_window_type_dialog, | ||
847 | 87 | mir_window_type_overlay, /**< \deprecated Use "gloss" instead. */ | ||
848 | 88 | mir_window_type_gloss = mir_window_type_overlay, | ||
849 | 89 | mir_window_type_freestyle, | ||
850 | 90 | mir_window_type_popover, /**< \deprecated Choose "menu" or "tip" */ | ||
851 | 91 | mir_window_type_menu = mir_window_type_popover, | ||
852 | 92 | mir_window_type_inputmethod, /**< AKA "OSK" or handwriting etc. */ | ||
853 | 93 | mir_window_type_satellite, /**< AKA "toolbox"/"toolbar" */ | ||
854 | 94 | mir_window_type_tip, /**< AKA "tooltip" */ | ||
855 | 95 | mir_window_types | ||
856 | 96 | } MirWindowType; | ||
857 | 63 | 97 | ||
858 | 64 | typedef enum MirSurfaceState | 98 | typedef enum MirSurfaceState |
859 | 65 | { | 99 | { |
860 | 66 | 100 | ||
861 | === modified file 'include/server/mir/scene/null_surface_observer.h' | |||
862 | --- include/server/mir/scene/null_surface_observer.h 2016-10-31 02:37:31 +0000 | |||
863 | +++ include/server/mir/scene/null_surface_observer.h 2017-01-10 20:52:04 +0000 | |||
864 | @@ -31,7 +31,7 @@ | |||
865 | 31 | NullSurfaceObserver() = default; | 31 | NullSurfaceObserver() = default; |
866 | 32 | virtual ~NullSurfaceObserver() = default; | 32 | virtual ~NullSurfaceObserver() = default; |
867 | 33 | 33 | ||
869 | 34 | void attrib_changed(MirSurfaceAttrib attrib, int value) override; | 34 | void attrib_changed(MirWindowAttrib attrib, int value) override; |
870 | 35 | void resized_to(geometry::Size const& size) override; | 35 | void resized_to(geometry::Size const& size) override; |
871 | 36 | void moved_to(geometry::Point const& top_left) override; | 36 | void moved_to(geometry::Point const& top_left) override; |
872 | 37 | void hidden_set_to(bool hide) override; | 37 | void hidden_set_to(bool hide) override; |
873 | 38 | 38 | ||
874 | === modified file 'include/server/mir/scene/surface.h' | |||
875 | --- include/server/mir/scene/surface.h 2016-11-11 07:56:09 +0000 | |||
876 | +++ include/server/mir/scene/surface.h 2017-01-10 20:52:04 +0000 | |||
877 | @@ -68,7 +68,7 @@ | |||
878 | 68 | virtual int buffers_ready_for_compositor(void const* compositor_id) const = 0; | 68 | virtual int buffers_ready_for_compositor(void const* compositor_id) const = 0; |
879 | 69 | 69 | ||
880 | 70 | virtual float alpha() const = 0; //only used in examples/ | 70 | virtual float alpha() const = 0; //only used in examples/ |
882 | 71 | virtual MirSurfaceType type() const = 0; | 71 | virtual MirWindowType type() const = 0; |
883 | 72 | virtual MirSurfaceState state() const = 0; | 72 | virtual MirSurfaceState state() const = 0; |
884 | 73 | virtual void hide() = 0; | 73 | virtual void hide() = 0; |
885 | 74 | virtual void show() = 0; | 74 | virtual void show() = 0; |
886 | @@ -107,9 +107,9 @@ | |||
887 | 107 | virtual std::shared_ptr<Surface> parent() const = 0; | 107 | virtual std::shared_ptr<Surface> parent() const = 0; |
888 | 108 | 108 | ||
889 | 109 | // TODO a legacy of old interactions and needs removing | 109 | // TODO a legacy of old interactions and needs removing |
891 | 110 | virtual int configure(MirSurfaceAttrib attrib, int value) = 0; | 110 | virtual int configure(MirWindowAttrib attrib, int value) = 0; |
892 | 111 | // TODO a legacy of old interactions and needs removing | 111 | // TODO a legacy of old interactions and needs removing |
894 | 112 | virtual int query(MirSurfaceAttrib attrib) const = 0; | 112 | virtual int query(MirWindowAttrib attrib) const = 0; |
895 | 113 | 113 | ||
896 | 114 | virtual void set_keymap(MirInputDeviceId id, std::string const& model, std::string const& layout, | 114 | virtual void set_keymap(MirInputDeviceId id, std::string const& model, std::string const& layout, |
897 | 115 | std::string const& variant, std::string const& options) = 0; | 115 | std::string const& variant, std::string const& options) = 0; |
898 | 116 | 116 | ||
899 | === modified file 'include/server/mir/scene/surface_creation_parameters.h' | |||
900 | --- include/server/mir/scene/surface_creation_parameters.h 2016-10-12 06:03:15 +0000 | |||
901 | +++ include/server/mir/scene/surface_creation_parameters.h 2017-01-10 20:52:04 +0000 | |||
902 | @@ -58,7 +58,7 @@ | |||
903 | 58 | 58 | ||
904 | 59 | SurfaceCreationParameters& with_output_id(graphics::DisplayConfigurationOutputId const& output_id); | 59 | SurfaceCreationParameters& with_output_id(graphics::DisplayConfigurationOutputId const& output_id); |
905 | 60 | 60 | ||
907 | 61 | SurfaceCreationParameters& of_type(MirSurfaceType type); | 61 | SurfaceCreationParameters& of_type(MirWindowType type); |
908 | 62 | 62 | ||
909 | 63 | SurfaceCreationParameters& with_state(MirSurfaceState state); | 63 | SurfaceCreationParameters& with_state(MirSurfaceState state); |
910 | 64 | 64 | ||
911 | @@ -81,7 +81,7 @@ | |||
912 | 81 | graphics::DisplayConfigurationOutputId output_id; | 81 | graphics::DisplayConfigurationOutputId output_id; |
913 | 82 | 82 | ||
914 | 83 | mir::optional_value<MirSurfaceState> state; | 83 | mir::optional_value<MirSurfaceState> state; |
916 | 84 | mir::optional_value<MirSurfaceType> type; | 84 | mir::optional_value<MirWindowType> type; |
917 | 85 | mir::optional_value<MirOrientationMode> preferred_orientation; | 85 | mir::optional_value<MirOrientationMode> preferred_orientation; |
918 | 86 | mir::optional_value<frontend::SurfaceId> parent_id; | 86 | mir::optional_value<frontend::SurfaceId> parent_id; |
919 | 87 | mir::optional_value<frontend::BufferStreamId> content_id; | 87 | mir::optional_value<frontend::BufferStreamId> content_id; |
920 | 88 | 88 | ||
921 | === modified file 'include/server/mir/scene/surface_observer.h' | |||
922 | --- include/server/mir/scene/surface_observer.h 2016-10-31 02:37:31 +0000 | |||
923 | +++ include/server/mir/scene/surface_observer.h 2017-01-10 20:52:04 +0000 | |||
924 | @@ -45,7 +45,7 @@ | |||
925 | 45 | class SurfaceObserver | 45 | class SurfaceObserver |
926 | 46 | { | 46 | { |
927 | 47 | public: | 47 | public: |
929 | 48 | virtual void attrib_changed(MirSurfaceAttrib attrib, int value) = 0; | 48 | virtual void attrib_changed(MirWindowAttrib attrib, int value) = 0; |
930 | 49 | virtual void resized_to(geometry::Size const& size) = 0; | 49 | virtual void resized_to(geometry::Size const& size) = 0; |
931 | 50 | virtual void moved_to(geometry::Point const& top_left) = 0; | 50 | virtual void moved_to(geometry::Point const& top_left) = 0; |
932 | 51 | virtual void hidden_set_to(bool hide) = 0; | 51 | virtual void hidden_set_to(bool hide) = 0; |
933 | 52 | 52 | ||
934 | === modified file 'include/server/mir/shell/abstract_shell.h' | |||
935 | --- include/server/mir/shell/abstract_shell.h 2016-08-02 19:44:59 +0000 | |||
936 | +++ include/server/mir/shell/abstract_shell.h 2017-01-10 20:52:04 +0000 | |||
937 | @@ -70,12 +70,12 @@ | |||
938 | 70 | int set_surface_attribute( | 70 | int set_surface_attribute( |
939 | 71 | std::shared_ptr<scene::Session> const& session, | 71 | std::shared_ptr<scene::Session> const& session, |
940 | 72 | std::shared_ptr<scene::Surface> const& surface, | 72 | std::shared_ptr<scene::Surface> const& surface, |
942 | 73 | MirSurfaceAttrib attrib, | 73 | MirWindowAttrib attrib, |
943 | 74 | int value) override; | 74 | int value) override; |
944 | 75 | 75 | ||
945 | 76 | int get_surface_attribute( | 76 | int get_surface_attribute( |
946 | 77 | std::shared_ptr<scene::Surface> const& surface, | 77 | std::shared_ptr<scene::Surface> const& surface, |
948 | 78 | MirSurfaceAttrib attrib) override; | 78 | MirWindowAttrib attrib) override; |
949 | 79 | 79 | ||
950 | 80 | void raise_surface( | 80 | void raise_surface( |
951 | 81 | std::shared_ptr<scene::Session> const& session, | 81 | std::shared_ptr<scene::Session> const& session, |
952 | 82 | 82 | ||
953 | === modified file 'include/server/mir/shell/shell.h' | |||
954 | --- include/server/mir/shell/shell.h 2016-01-29 08:18:22 +0000 | |||
955 | +++ include/server/mir/shell/shell.h 2017-01-10 20:52:04 +0000 | |||
956 | @@ -88,12 +88,12 @@ | |||
957 | 88 | virtual int set_surface_attribute( | 88 | virtual int set_surface_attribute( |
958 | 89 | std::shared_ptr<scene::Session> const& session, | 89 | std::shared_ptr<scene::Session> const& session, |
959 | 90 | std::shared_ptr<scene::Surface> const& surface, | 90 | std::shared_ptr<scene::Surface> const& surface, |
961 | 91 | MirSurfaceAttrib attrib, | 91 | MirWindowAttrib attrib, |
962 | 92 | int value) = 0; | 92 | int value) = 0; |
963 | 93 | 93 | ||
964 | 94 | virtual int get_surface_attribute( | 94 | virtual int get_surface_attribute( |
965 | 95 | std::shared_ptr<scene::Surface> const& surface, | 95 | std::shared_ptr<scene::Surface> const& surface, |
967 | 96 | MirSurfaceAttrib attrib) = 0; | 96 | MirWindowAttrib attrib) = 0; |
968 | 97 | 97 | ||
969 | 98 | virtual void raise_surface( | 98 | virtual void raise_surface( |
970 | 99 | std::shared_ptr<scene::Session> const& session, | 99 | std::shared_ptr<scene::Session> const& session, |
971 | 100 | 100 | ||
972 | === modified file 'include/server/mir/shell/shell_report.h' | |||
973 | --- include/server/mir/shell/shell_report.h 2016-09-08 02:58:56 +0000 | |||
974 | +++ include/server/mir/shell/shell_report.h 2017-01-10 20:52:04 +0000 | |||
975 | @@ -54,7 +54,7 @@ | |||
976 | 54 | 54 | ||
977 | 55 | virtual void update_surface( | 55 | virtual void update_surface( |
978 | 56 | scene::Session const& session, scene::Surface const& surface, | 56 | scene::Session const& session, scene::Surface const& surface, |
980 | 57 | MirSurfaceAttrib attrib, int value) = 0; | 57 | MirWindowAttrib attrib, int value) = 0; |
981 | 58 | 58 | ||
982 | 59 | virtual void destroying_surface( | 59 | virtual void destroying_surface( |
983 | 60 | scene::Session const& session, frontend::SurfaceId surface) = 0; | 60 | scene::Session const& session, frontend::SurfaceId surface) = 0; |
984 | 61 | 61 | ||
985 | === modified file 'include/server/mir/shell/shell_wrapper.h' | |||
986 | --- include/server/mir/shell/shell_wrapper.h 2016-01-29 08:18:22 +0000 | |||
987 | +++ include/server/mir/shell/shell_wrapper.h 2017-01-10 20:52:04 +0000 | |||
988 | @@ -73,12 +73,12 @@ | |||
989 | 73 | int set_surface_attribute( | 73 | int set_surface_attribute( |
990 | 74 | std::shared_ptr<scene::Session> const& session, | 74 | std::shared_ptr<scene::Session> const& session, |
991 | 75 | std::shared_ptr<scene::Surface> const& surface, | 75 | std::shared_ptr<scene::Surface> const& surface, |
993 | 76 | MirSurfaceAttrib attrib, | 76 | MirWindowAttrib attrib, |
994 | 77 | int value) override; | 77 | int value) override; |
995 | 78 | 78 | ||
996 | 79 | int get_surface_attribute( | 79 | int get_surface_attribute( |
997 | 80 | std::shared_ptr<scene::Surface> const& surface, | 80 | std::shared_ptr<scene::Surface> const& surface, |
999 | 81 | MirSurfaceAttrib attrib) override; | 81 | MirWindowAttrib attrib) override; |
1000 | 82 | 82 | ||
1001 | 83 | void raise_surface( | 83 | void raise_surface( |
1002 | 84 | std::shared_ptr<scene::Session> const& session, | 84 | std::shared_ptr<scene::Session> const& session, |
1003 | 85 | 85 | ||
1004 | === modified file 'include/server/mir/shell/surface_specification.h' | |||
1005 | --- include/server/mir/shell/surface_specification.h 2016-12-09 02:54:31 +0000 | |||
1006 | +++ include/server/mir/shell/surface_specification.h 2017-01-10 20:52:04 +0000 | |||
1007 | @@ -64,7 +64,7 @@ | |||
1008 | 64 | optional_value<graphics::BufferUsage> buffer_usage; | 64 | optional_value<graphics::BufferUsage> buffer_usage; |
1009 | 65 | optional_value<std::string> name; | 65 | optional_value<std::string> name; |
1010 | 66 | optional_value<graphics::DisplayConfigurationOutputId> output_id; | 66 | optional_value<graphics::DisplayConfigurationOutputId> output_id; |
1012 | 67 | optional_value<MirSurfaceType> type; | 67 | optional_value<MirWindowType> type; |
1013 | 68 | optional_value<MirSurfaceState> state; | 68 | optional_value<MirSurfaceState> state; |
1014 | 69 | optional_value<MirOrientationMode> preferred_orientation; | 69 | optional_value<MirOrientationMode> preferred_orientation; |
1015 | 70 | optional_value<frontend::SurfaceId> parent_id; | 70 | optional_value<frontend::SurfaceId> parent_id; |
1016 | 71 | 71 | ||
1017 | === modified file 'include/server/mir/shell/system_compositor_window_manager.h' | |||
1018 | --- include/server/mir/shell/system_compositor_window_manager.h 2016-01-29 08:18:22 +0000 | |||
1019 | +++ include/server/mir/shell/system_compositor_window_manager.h 2017-01-10 20:52:04 +0000 | |||
1020 | @@ -98,7 +98,7 @@ | |||
1021 | 98 | int set_surface_attribute( | 98 | int set_surface_attribute( |
1022 | 99 | std::shared_ptr<scene::Session> const& session, | 99 | std::shared_ptr<scene::Session> const& session, |
1023 | 100 | std::shared_ptr<scene::Surface> const& surface, | 100 | std::shared_ptr<scene::Surface> const& surface, |
1025 | 101 | MirSurfaceAttrib attrib, | 101 | MirWindowAttrib attrib, |
1026 | 102 | int value) override; | 102 | int value) override; |
1027 | 103 | 103 | ||
1028 | 104 | using OutputMap = std::map<std::weak_ptr<scene::Surface>, graphics::DisplayConfigurationOutputId, std::owner_less<std::weak_ptr<scene::Surface>>>; | 104 | using OutputMap = std::map<std::weak_ptr<scene::Surface>, graphics::DisplayConfigurationOutputId, std::owner_less<std::weak_ptr<scene::Surface>>>; |
1029 | 105 | 105 | ||
1030 | === modified file 'include/server/mir/shell/window_manager.h' | |||
1031 | --- include/server/mir/shell/window_manager.h 2016-01-29 08:18:22 +0000 | |||
1032 | +++ include/server/mir/shell/window_manager.h 2017-01-10 20:52:04 +0000 | |||
1033 | @@ -68,7 +68,7 @@ | |||
1034 | 68 | virtual int set_surface_attribute( | 68 | virtual int set_surface_attribute( |
1035 | 69 | std::shared_ptr<scene::Session> const& session, | 69 | std::shared_ptr<scene::Session> const& session, |
1036 | 70 | std::shared_ptr<scene::Surface> const& surface, | 70 | std::shared_ptr<scene::Surface> const& surface, |
1038 | 71 | MirSurfaceAttrib attrib, | 71 | MirWindowAttrib attrib, |
1039 | 72 | int value) = 0; | 72 | int value) = 0; |
1040 | 73 | 73 | ||
1041 | 74 | virtual void handle_raise_surface( | 74 | virtual void handle_raise_surface( |
1042 | 75 | 75 | ||
1043 | === modified file 'include/test/mir/test/doubles/mock_window_manager.h' | |||
1044 | --- include/test/mir/test/doubles/mock_window_manager.h 2016-01-29 08:18:22 +0000 | |||
1045 | +++ include/test/mir/test/doubles/mock_window_manager.h 2017-01-10 20:52:04 +0000 | |||
1046 | @@ -62,7 +62,7 @@ | |||
1047 | 62 | MOCK_METHOD4(set_surface_attribute, | 62 | MOCK_METHOD4(set_surface_attribute, |
1048 | 63 | int(std::shared_ptr<scene::Session> const& session, | 63 | int(std::shared_ptr<scene::Session> const& session, |
1049 | 64 | std::shared_ptr<scene::Surface> const& surface, | 64 | std::shared_ptr<scene::Surface> const& surface, |
1051 | 65 | MirSurfaceAttrib attrib, | 65 | MirWindowAttrib attrib, |
1052 | 66 | int value)); | 66 | int value)); |
1053 | 67 | 67 | ||
1054 | 68 | static frontend::SurfaceId add_surface_default( | 68 | static frontend::SurfaceId add_surface_default( |
1055 | 69 | 69 | ||
1056 | === modified file 'include/test/mir/test/doubles/stub_surface.h' | |||
1057 | --- include/test/mir/test/doubles/stub_surface.h 2016-10-31 02:37:31 +0000 | |||
1058 | +++ include/test/mir/test/doubles/stub_surface.h 2017-01-10 20:52:04 +0000 | |||
1059 | @@ -54,10 +54,10 @@ | |||
1060 | 54 | bool visible() const override; | 54 | bool visible() const override; |
1061 | 55 | graphics::RenderableList generate_renderables(compositor::CompositorID id) const override; | 55 | graphics::RenderableList generate_renderables(compositor::CompositorID id) const override; |
1062 | 56 | int buffers_ready_for_compositor(void const* compositor_id) const override; | 56 | int buffers_ready_for_compositor(void const* compositor_id) const override; |
1064 | 57 | MirSurfaceType type() const override; | 57 | MirWindowType type() const override; |
1065 | 58 | MirSurfaceState state() const override; | 58 | MirSurfaceState state() const override; |
1068 | 59 | int configure(MirSurfaceAttrib attrib, int value) override; | 59 | int configure(MirWindowAttrib attrib, int value) override; |
1069 | 60 | int query(MirSurfaceAttrib attrib) const override; | 60 | int query(MirWindowAttrib attrib) const override; |
1070 | 61 | void hide() override; | 61 | void hide() override; |
1071 | 62 | void show() override; | 62 | void show() override; |
1072 | 63 | void set_cursor_image(std::shared_ptr<graphics::CursorImage> const& image) override; | 63 | void set_cursor_image(std::shared_ptr<graphics::CursorImage> const& image) override; |
1073 | 64 | 64 | ||
1074 | === modified file 'include/test/mir/test/event_matchers.h' | |||
1075 | --- include/test/mir/test/event_matchers.h 2017-01-06 03:31:04 +0000 | |||
1076 | +++ include/test/mir/test/event_matchers.h 2017-01-10 20:52:04 +0000 | |||
1077 | @@ -488,15 +488,16 @@ | |||
1078 | 488 | return true; | 488 | return true; |
1079 | 489 | } | 489 | } |
1080 | 490 | 490 | ||
1082 | 491 | MATCHER_P2(SurfaceEvent, attrib, value, "") | 491 | MATCHER_P2(WindowEvent, attrib, value, "") |
1083 | 492 | { | 492 | { |
1084 | 493 | auto as_address = to_address(arg); | 493 | auto as_address = to_address(arg); |
1091 | 494 | if (mir_event_get_type(as_address) != mir_event_type_surface) | 494 | if (mir_event_get_type(as_address) != mir_event_type_window) |
1092 | 495 | return false; | 495 | return false; |
1093 | 496 | auto surface_ev = mir_event_get_surface_event(as_address); | 496 | auto surface_ev = mir_event_get_window_event(as_address); |
1094 | 497 | if (mir_surface_event_get_attribute(surface_ev) != attrib) | 497 | auto window_attrib = mir_window_event_get_attribute(surface_ev); |
1095 | 498 | return false; | 498 | if (window_attrib != attrib) |
1096 | 499 | if (mir_surface_event_get_attribute_value(surface_ev) != value) | 499 | return false; |
1097 | 500 | if (mir_window_event_get_attribute_value(surface_ev) != value) | ||
1098 | 500 | return false; | 501 | return false; |
1099 | 501 | return true; | 502 | return true; |
1100 | 502 | } | 503 | } |
1101 | 503 | 504 | ||
1102 | === modified file 'src/client/buffer_stream.cpp' | |||
1103 | --- src/client/buffer_stream.cpp 2017-01-09 06:48:47 +0000 | |||
1104 | +++ src/client/buffer_stream.cpp 2017-01-10 20:52:04 +0000 | |||
1105 | @@ -411,12 +411,12 @@ | |||
1106 | 411 | swap_buffers([](){})->wait_for_all(); | 411 | swap_buffers([](){})->wait_for_all(); |
1107 | 412 | } | 412 | } |
1108 | 413 | 413 | ||
1110 | 414 | void mcl::BufferStream::request_and_wait_for_configure(MirSurfaceAttrib attrib, int interval) | 414 | void mcl::BufferStream::request_and_wait_for_configure(MirWindowAttrib attrib, int interval) |
1111 | 415 | { | 415 | { |
1113 | 416 | if (attrib != mir_surface_attrib_swapinterval) | 416 | if (attrib != mir_window_attrib_swapinterval) |
1114 | 417 | { | 417 | { |
1115 | 418 | BOOST_THROW_EXCEPTION(std::logic_error("Attempt to configure surface attribute " + std::to_string(attrib) + | 418 | BOOST_THROW_EXCEPTION(std::logic_error("Attempt to configure surface attribute " + std::to_string(attrib) + |
1117 | 419 | " on BufferStream but only mir_surface_attrib_swapinterval is supported")); | 419 | " on BufferStream but only mir_window_attrib_swapinterval is supported")); |
1118 | 420 | } | 420 | } |
1119 | 421 | mir_wait_for(set_swap_interval(interval)); | 421 | mir_wait_for(set_swap_interval(interval)); |
1120 | 422 | } | 422 | } |
1121 | 423 | 423 | ||
1122 | === modified file 'src/client/buffer_stream.h' | |||
1123 | --- src/client/buffer_stream.h 2017-01-09 06:48:47 +0000 | |||
1124 | +++ src/client/buffer_stream.h 2017-01-10 20:52:04 +0000 | |||
1125 | @@ -106,7 +106,7 @@ | |||
1126 | 106 | MirWindowParameters get_parameters() const override; | 106 | MirWindowParameters get_parameters() const override; |
1127 | 107 | void swap_buffers_sync() override; | 107 | void swap_buffers_sync() override; |
1128 | 108 | 108 | ||
1130 | 109 | void request_and_wait_for_configure(MirSurfaceAttrib attrib, int) override; | 109 | void request_and_wait_for_configure(MirWindowAttrib attrib, int) override; |
1131 | 110 | 110 | ||
1132 | 111 | MirNativeBuffer* get_current_buffer_package() override; | 111 | MirNativeBuffer* get_current_buffer_package() override; |
1133 | 112 | 112 | ||
1134 | 113 | 113 | ||
1135 | === modified file 'src/client/event.cpp' | |||
1136 | --- src/client/event.cpp 2016-11-11 07:56:09 +0000 | |||
1137 | +++ src/client/event.cpp 2017-01-10 20:52:04 +0000 | |||
1138 | @@ -33,6 +33,7 @@ | |||
1139 | 33 | #include "mir_toolkit/events/orientation_event.h" | 33 | #include "mir_toolkit/events/orientation_event.h" |
1140 | 34 | #include "mir_toolkit/events/input_device_state_event.h" | 34 | #include "mir_toolkit/events/input_device_state_event.h" |
1141 | 35 | #include "mir_toolkit/events/surface_placement.h" | 35 | #include "mir_toolkit/events/surface_placement.h" |
1142 | 36 | #include "mir_toolkit/events/window_placement.h" | ||
1143 | 36 | 37 | ||
1144 | 37 | #include <cstdlib> | 38 | #include <cstdlib> |
1145 | 38 | #include <cstring> | 39 | #include <cstring> |
1146 | @@ -71,20 +72,22 @@ | |||
1147 | 71 | return "mir_event_type_key"; | 72 | return "mir_event_type_key"; |
1148 | 72 | case mir_event_type_motion: | 73 | case mir_event_type_motion: |
1149 | 73 | return "mir_event_type_motion"; | 74 | return "mir_event_type_motion"; |
1152 | 74 | case mir_event_type_surface: | 75 | case mir_event_type_window: |
1153 | 75 | return "mir_event_type_surface"; | 76 | return "mir_event_type_window"; |
1154 | 76 | case mir_event_type_resize: | 77 | case mir_event_type_resize: |
1155 | 77 | return "mir_event_type_resize"; | 78 | return "mir_event_type_resize"; |
1156 | 78 | case mir_event_type_prompt_session_state_change: | 79 | case mir_event_type_prompt_session_state_change: |
1157 | 79 | return "mir_event_type_prompt_session_state_change"; | 80 | return "mir_event_type_prompt_session_state_change"; |
1158 | 80 | case mir_event_type_orientation: | 81 | case mir_event_type_orientation: |
1159 | 81 | return "mir_event_type_orientation"; | 82 | return "mir_event_type_orientation"; |
1162 | 82 | case mir_event_type_close_surface: | 83 | case mir_event_type_close_window: |
1163 | 83 | return "mir_event_type_close_surface"; | 84 | return "mir_event_type_close_window"; |
1164 | 84 | case mir_event_type_input: | 85 | case mir_event_type_input: |
1165 | 85 | return "mir_event_type_input"; | 86 | return "mir_event_type_input"; |
1166 | 86 | case mir_event_type_input_device_state: | 87 | case mir_event_type_input_device_state: |
1167 | 87 | return "mir_event_type_input_device_state"; | 88 | return "mir_event_type_input_device_state"; |
1168 | 89 | case mir_event_type_window_output: | ||
1169 | 90 | return "mir_event_type_window_output"; | ||
1170 | 88 | default: | 91 | default: |
1171 | 89 | abort(); | 92 | abort(); |
1172 | 90 | } | 93 | } |
1173 | @@ -111,7 +114,14 @@ | |||
1174 | 111 | 114 | ||
1175 | 112 | MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | 115 | MirSurfaceEvent const* mir_event_get_surface_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
1176 | 113 | { | 116 | { |
1178 | 114 | expect_event_type(ev, mir_event_type_surface); | 117 | expect_event_type(ev, mir_event_type_window); |
1179 | 118 | |||
1180 | 119 | return ev->to_surface(); | ||
1181 | 120 | }) | ||
1182 | 121 | |||
1183 | 122 | MirWindowEvent const* mir_event_get_window_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | ||
1184 | 123 | { | ||
1185 | 124 | expect_event_type(ev, mir_event_type_window); | ||
1186 | 115 | 125 | ||
1187 | 116 | return ev->to_surface(); | 126 | return ev->to_surface(); |
1188 | 117 | }) | 127 | }) |
1189 | @@ -139,7 +149,7 @@ | |||
1190 | 139 | 149 | ||
1191 | 140 | MirCloseSurfaceEvent const* mir_event_get_close_surface_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | 150 | MirCloseSurfaceEvent const* mir_event_get_close_surface_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
1192 | 141 | { | 151 | { |
1194 | 142 | expect_event_type(ev, mir_event_type_close_surface); | 152 | expect_event_type(ev, mir_event_type_close_window); |
1195 | 143 | 153 | ||
1196 | 144 | return ev->to_close_surface(); | 154 | return ev->to_close_surface(); |
1197 | 145 | }) | 155 | }) |
1198 | @@ -163,7 +173,14 @@ | |||
1199 | 163 | 173 | ||
1200 | 164 | MirSurfaceOutputEvent const* mir_event_get_surface_output_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | 174 | MirSurfaceOutputEvent const* mir_event_get_surface_output_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
1201 | 165 | { | 175 | { |
1203 | 166 | expect_event_type(ev, mir_event_type_surface_output); | 176 | expect_event_type(ev, mir_event_type_window_output); |
1204 | 177 | |||
1205 | 178 | return ev->to_surface_output(); | ||
1206 | 179 | }) | ||
1207 | 180 | |||
1208 | 181 | MirWindowOutputEvent const* mir_event_get_window_output_event(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | ||
1209 | 182 | { | ||
1210 | 183 | expect_event_type(ev, mir_event_type_window_output); | ||
1211 | 167 | 184 | ||
1212 | 168 | return ev->to_surface_output(); | 185 | return ev->to_surface_output(); |
1213 | 169 | }) | 186 | }) |
1214 | @@ -179,14 +196,30 @@ | |||
1215 | 179 | 196 | ||
1216 | 180 | MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | 197 | MirSurfaceAttrib mir_surface_event_get_attribute(MirSurfaceEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
1217 | 181 | { | 198 | { |
1219 | 182 | expect_event_type(ev, mir_event_type_surface); | 199 | expect_event_type(ev, mir_event_type_window); |
1220 | 200 | |||
1221 | 201 | return static_cast<MirSurfaceAttrib>(ev->attrib()); | ||
1222 | 202 | }) | ||
1223 | 203 | |||
1224 | 204 | int mir_surface_event_get_attribute_value(MirSurfaceEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | ||
1225 | 205 | { | ||
1226 | 206 | expect_event_type(ev, mir_event_type_window); | ||
1227 | 207 | |||
1228 | 208 | return ev->value(); | ||
1229 | 209 | }) | ||
1230 | 210 | |||
1231 | 211 | /* Window event accessors */ | ||
1232 | 212 | |||
1233 | 213 | MirWindowAttrib mir_window_event_get_attribute(MirWindowEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | ||
1234 | 214 | { | ||
1235 | 215 | expect_event_type(ev, mir_event_type_window); | ||
1236 | 183 | 216 | ||
1237 | 184 | return ev->attrib(); | 217 | return ev->attrib(); |
1238 | 185 | }) | 218 | }) |
1239 | 186 | 219 | ||
1241 | 187 | int mir_surface_event_get_attribute_value(MirSurfaceEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | 220 | int mir_window_event_get_attribute_value(MirWindowEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
1242 | 188 | { | 221 | { |
1244 | 189 | expect_event_type(ev, mir_event_type_surface); | 222 | expect_event_type(ev, mir_event_type_window); |
1245 | 190 | 223 | ||
1246 | 191 | return ev->value(); | 224 | return ev->value(); |
1247 | 192 | }) | 225 | }) |
1248 | @@ -264,31 +297,63 @@ | |||
1249 | 264 | 297 | ||
1250 | 265 | int mir_surface_output_event_get_dpi(MirSurfaceOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | 298 | int mir_surface_output_event_get_dpi(MirSurfaceOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
1251 | 266 | { | 299 | { |
1253 | 267 | expect_event_type(ev, mir_event_type_surface_output); | 300 | expect_event_type(ev, mir_event_type_window_output); |
1254 | 268 | return ev->dpi(); | 301 | return ev->dpi(); |
1255 | 269 | }) | 302 | }) |
1256 | 270 | 303 | ||
1257 | 271 | MirFormFactor mir_surface_output_event_get_form_factor(MirSurfaceOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | 304 | MirFormFactor mir_surface_output_event_get_form_factor(MirSurfaceOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
1258 | 272 | { | 305 | { |
1260 | 273 | expect_event_type(ev, mir_event_type_surface_output); | 306 | expect_event_type(ev, mir_event_type_window_output); |
1261 | 274 | return ev->form_factor(); | 307 | return ev->form_factor(); |
1262 | 275 | }) | 308 | }) |
1263 | 276 | 309 | ||
1264 | 277 | float mir_surface_output_event_get_scale(MirSurfaceOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | 310 | float mir_surface_output_event_get_scale(MirSurfaceOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
1265 | 278 | { | 311 | { |
1267 | 279 | expect_event_type(ev, mir_event_type_surface_output); | 312 | expect_event_type(ev, mir_event_type_window_output); |
1268 | 280 | return ev->scale(); | 313 | return ev->scale(); |
1269 | 281 | }) | 314 | }) |
1270 | 282 | 315 | ||
1271 | 283 | double mir_surface_output_event_get_refresh_rate(MirSurfaceOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | 316 | double mir_surface_output_event_get_refresh_rate(MirSurfaceOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
1272 | 284 | { | 317 | { |
1274 | 285 | expect_event_type(ev, mir_event_type_surface_output); | 318 | expect_event_type(ev, mir_event_type_window_output); |
1275 | 286 | return ev->refresh_rate(); | 319 | return ev->refresh_rate(); |
1276 | 287 | }) | 320 | }) |
1277 | 288 | 321 | ||
1278 | 289 | uint32_t mir_surface_output_event_get_output_id(MirSurfaceOutputEvent const *ev) MIR_HANDLE_EVENT_EXCEPTION( | 322 | uint32_t mir_surface_output_event_get_output_id(MirSurfaceOutputEvent const *ev) MIR_HANDLE_EVENT_EXCEPTION( |
1279 | 290 | { | 323 | { |
1281 | 291 | expect_event_type(ev, mir_event_type_surface_output); | 324 | expect_event_type(ev, mir_event_type_window_output); |
1282 | 325 | return ev->output_id(); | ||
1283 | 326 | }) | ||
1284 | 327 | |||
1285 | 328 | /* Window output event accessors */ | ||
1286 | 329 | |||
1287 | 330 | int mir_window_output_event_get_dpi(MirWindowOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | ||
1288 | 331 | { | ||
1289 | 332 | expect_event_type(ev, mir_event_type_window_output); | ||
1290 | 333 | return ev->dpi(); | ||
1291 | 334 | }) | ||
1292 | 335 | |||
1293 | 336 | MirFormFactor mir_window_output_event_get_form_factor(MirWindowOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | ||
1294 | 337 | { | ||
1295 | 338 | expect_event_type(ev, mir_event_type_window_output); | ||
1296 | 339 | return ev->form_factor(); | ||
1297 | 340 | }) | ||
1298 | 341 | |||
1299 | 342 | float mir_window_output_event_get_scale(MirWindowOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | ||
1300 | 343 | { | ||
1301 | 344 | expect_event_type(ev, mir_event_type_window_output); | ||
1302 | 345 | return ev->scale(); | ||
1303 | 346 | }) | ||
1304 | 347 | |||
1305 | 348 | double mir_window_output_event_get_refresh_rate(MirWindowOutputEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | ||
1306 | 349 | { | ||
1307 | 350 | expect_event_type(ev, mir_event_type_window_output); | ||
1308 | 351 | return ev->refresh_rate(); | ||
1309 | 352 | }) | ||
1310 | 353 | |||
1311 | 354 | uint32_t mir_window_output_event_get_output_id(MirWindowOutputEvent const *ev) MIR_HANDLE_EVENT_EXCEPTION( | ||
1312 | 355 | { | ||
1313 | 356 | expect_event_type(ev, mir_event_type_window_output); | ||
1314 | 292 | return ev->output_id(); | 357 | return ev->output_id(); |
1315 | 293 | }) | 358 | }) |
1316 | 294 | 359 | ||
1317 | @@ -362,6 +427,16 @@ | |||
1318 | 362 | return event->placement(); | 427 | return event->placement(); |
1319 | 363 | }) | 428 | }) |
1320 | 364 | 429 | ||
1321 | 430 | MirWindowPlacementEvent const* mir_event_get_window_placement_event(MirEvent const* event) MIR_HANDLE_EVENT_EXCEPTION( | ||
1322 | 431 | { | ||
1323 | 432 | return event->to_surface_placement(); | ||
1324 | 433 | }) | ||
1325 | 434 | |||
1326 | 435 | MirRectangle mir_window_placement_get_relative_position(MirWindowPlacementEvent const* event) MIR_HANDLE_EVENT_EXCEPTION( | ||
1327 | 436 | { | ||
1328 | 437 | return event->placement(); | ||
1329 | 438 | }) | ||
1330 | 439 | |||
1331 | 365 | // TODO: Until we opaquify the MirEvent structure and add | 440 | // TODO: Until we opaquify the MirEvent structure and add |
1332 | 366 | // a ref count ref is implemented as copy. | 441 | // a ref count ref is implemented as copy. |
1333 | 367 | MirEvent const* mir_event_ref(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( | 442 | MirEvent const* mir_event_ref(MirEvent const* ev) MIR_HANDLE_EVENT_EXCEPTION( |
1334 | 368 | 443 | ||
1335 | === modified file 'src/client/event_printer.cpp' | |||
1336 | --- src/client/event_printer.cpp 2016-12-09 02:54:31 +0000 | |||
1337 | +++ src/client/event_printer.cpp 2017-01-10 20:52:04 +0000 | |||
1338 | @@ -146,6 +146,22 @@ | |||
1339 | 146 | } | 146 | } |
1340 | 147 | } | 147 | } |
1341 | 148 | 148 | ||
1342 | 149 | std::ostream& mir::operator<<(std::ostream& out, MirWindowAttrib attribute) | ||
1343 | 150 | { | ||
1344 | 151 | switch (attribute) | ||
1345 | 152 | { | ||
1346 | 153 | PRINT(mir_window_attrib,type); | ||
1347 | 154 | PRINT(mir_window_attrib,dpi); | ||
1348 | 155 | PRINT(mir_window_attrib,focus); | ||
1349 | 156 | PRINT(mir_window_attrib,state); | ||
1350 | 157 | PRINT(mir_window_attrib,visibility); | ||
1351 | 158 | PRINT(mir_window_attrib,swapinterval); | ||
1352 | 159 | PRINT(mir_window_attrib,preferred_orientation); | ||
1353 | 160 | default: | ||
1354 | 161 | return out << static_cast<int>(attribute) << "<INVALID>"; | ||
1355 | 162 | } | ||
1356 | 163 | } | ||
1357 | 164 | |||
1358 | 149 | std::ostream& mir::operator<<(std::ostream& out, MirSurfaceFocusState state) | 165 | std::ostream& mir::operator<<(std::ostream& out, MirSurfaceFocusState state) |
1359 | 150 | { | 166 | { |
1360 | 151 | switch (state) | 167 | switch (state) |
1361 | @@ -186,6 +202,24 @@ | |||
1362 | 186 | } | 202 | } |
1363 | 187 | } | 203 | } |
1364 | 188 | 204 | ||
1365 | 205 | std::ostream& mir::operator<<(std::ostream& out, MirWindowType type) | ||
1366 | 206 | { | ||
1367 | 207 | switch (type) | ||
1368 | 208 | { | ||
1369 | 209 | PRINT(mir_window_type,normal); | ||
1370 | 210 | PRINT(mir_window_type,utility); | ||
1371 | 211 | PRINT(mir_window_type,dialog); | ||
1372 | 212 | PRINT(mir_window_type,gloss); | ||
1373 | 213 | PRINT(mir_window_type,freestyle); | ||
1374 | 214 | PRINT(mir_window_type,menu); | ||
1375 | 215 | PRINT(mir_window_type,inputmethod); | ||
1376 | 216 | PRINT(mir_window_type,satellite); | ||
1377 | 217 | PRINT(mir_window_type,tip); | ||
1378 | 218 | default: | ||
1379 | 219 | return out << static_cast<int>(type) << "<INVALID>"; | ||
1380 | 220 | } | ||
1381 | 221 | } | ||
1382 | 222 | |||
1383 | 189 | std::ostream& mir::operator<<(std::ostream& out, MirSurfaceState state) | 223 | std::ostream& mir::operator<<(std::ostream& out, MirSurfaceState state) |
1384 | 190 | { | 224 | { |
1385 | 191 | switch (state) | 225 | switch (state) |
1386 | @@ -283,37 +317,37 @@ | |||
1387 | 283 | return out << "keymap_event(blob, device_id=" << mir_keymap_event_get_device_id(&event) << ")"; | 317 | return out << "keymap_event(blob, device_id=" << mir_keymap_event_get_device_id(&event) << ")"; |
1388 | 284 | } | 318 | } |
1389 | 285 | 319 | ||
1391 | 286 | std::ostream& mir::operator<<(std::ostream& out, MirCloseSurfaceEvent const&) | 320 | std::ostream& mir::operator<<(std::ostream& out, MirCloseWindowEvent const&) |
1392 | 287 | { | 321 | { |
1393 | 288 | return out << "close_surface_event()"; | 322 | return out << "close_surface_event()"; |
1394 | 289 | } | 323 | } |
1395 | 290 | 324 | ||
1397 | 291 | std::ostream& mir::operator<<(std::ostream& out, MirSurfaceEvent const& event) | 325 | std::ostream& mir::operator<<(std::ostream& out, MirWindowEvent const& event) |
1398 | 292 | { | 326 | { |
1403 | 293 | out << "surface_event(" | 327 | out << "window_event(" |
1404 | 294 | << mir_surface_event_get_attribute(&event)<< '='; | 328 | << mir_window_event_get_attribute(&event)<< '='; |
1405 | 295 | auto value = mir_surface_event_get_attribute_value(&event); | 329 | auto value = mir_window_event_get_attribute_value(&event); |
1406 | 296 | switch (mir_surface_event_get_attribute(&event)) | 330 | switch (mir_window_event_get_attribute(&event)) |
1407 | 297 | { | 331 | { |
1410 | 298 | case mir_surface_attrib_type: | 332 | case mir_window_attrib_type: |
1411 | 299 | out << static_cast<MirSurfaceType>(value); | 333 | out << static_cast<MirWindowType>(value); |
1412 | 300 | break; | 334 | break; |
1414 | 301 | case mir_surface_attrib_state: | 335 | case mir_window_attrib_state: |
1415 | 302 | out << static_cast<MirSurfaceState>(value); | 336 | out << static_cast<MirSurfaceState>(value); |
1416 | 303 | break; | 337 | break; |
1418 | 304 | case mir_surface_attrib_swapinterval: | 338 | case mir_window_attrib_swapinterval: |
1419 | 305 | out << value; | 339 | out << value; |
1420 | 306 | break; | 340 | break; |
1422 | 307 | case mir_surface_attrib_focus: | 341 | case mir_window_attrib_focus: |
1423 | 308 | out << static_cast<MirSurfaceFocusState>(value); | 342 | out << static_cast<MirSurfaceFocusState>(value); |
1424 | 309 | break; | 343 | break; |
1426 | 310 | case mir_surface_attrib_dpi: | 344 | case mir_window_attrib_dpi: |
1427 | 311 | out << value; | 345 | out << value; |
1428 | 312 | break; | 346 | break; |
1430 | 313 | case mir_surface_attrib_visibility: | 347 | case mir_window_attrib_visibility: |
1431 | 314 | out << static_cast<MirSurfaceVisibility>(value); | 348 | out << static_cast<MirSurfaceVisibility>(value); |
1432 | 315 | break; | 349 | break; |
1434 | 316 | case mir_surface_attrib_preferred_orientation: | 350 | case mir_window_attrib_preferred_orientation: |
1435 | 317 | out << value; | 351 | out << value; |
1436 | 318 | break; | 352 | break; |
1437 | 319 | default: | 353 | default: |
1438 | @@ -323,7 +357,7 @@ | |||
1439 | 323 | return out << ')'; | 357 | return out << ')'; |
1440 | 324 | } | 358 | } |
1441 | 325 | 359 | ||
1443 | 326 | std::ostream& mir::operator<<(std::ostream& out, MirSurfacePlacementEvent const& event) | 360 | std::ostream& mir::operator<<(std::ostream& out, MirWindowPlacementEvent const& event) |
1444 | 327 | { | 361 | { |
1445 | 328 | auto const& placement = event.placement(); | 362 | auto const& placement = event.placement(); |
1446 | 329 | return out << "surface_placement_event({" | 363 | return out << "surface_placement_event({" |
1447 | @@ -366,16 +400,15 @@ | |||
1448 | 366 | 400 | ||
1449 | 367 | std::ostream& mir::operator<<(std::ostream& out, MirEvent const& event) | 401 | std::ostream& mir::operator<<(std::ostream& out, MirEvent const& event) |
1450 | 368 | { | 402 | { |
1451 | 403 | #pragma GCC diagnostic push | ||
1452 | 404 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
1453 | 369 | auto type = mir_event_get_type(&event); | 405 | auto type = mir_event_get_type(&event); |
1454 | 370 | switch (type) | 406 | switch (type) |
1455 | 371 | { | 407 | { |
1456 | 372 | PRINT_EVENT(surface); | 408 | PRINT_EVENT(surface); |
1457 | 373 | PRINT_EVENT(resize); | 409 | PRINT_EVENT(resize); |
1458 | 374 | PRINT_EVENT(orientation); | 410 | PRINT_EVENT(orientation); |
1459 | 375 | #pragma GCC diagnostic push | ||
1460 | 376 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
1461 | 377 | PRINT_EVENT(close_surface); | 411 | PRINT_EVENT(close_surface); |
1462 | 378 | #pragma GCC diagnostic pop | ||
1463 | 379 | PRINT_EVENT(input); | 412 | PRINT_EVENT(input); |
1464 | 380 | PRINT_EVENT(input_device_state); | 413 | PRINT_EVENT(input_device_state); |
1465 | 381 | PRINT_EVENT(keymap); | 414 | PRINT_EVENT(keymap); |
1466 | @@ -385,5 +418,6 @@ | |||
1467 | 385 | default: | 418 | default: |
1468 | 386 | return out << static_cast<int>(type) << "<INVALID>"; | 419 | return out << static_cast<int>(type) << "<INVALID>"; |
1469 | 387 | } | 420 | } |
1470 | 421 | #pragma GCC diagnostic pop | ||
1471 | 388 | } | 422 | } |
1472 | 389 | 423 | ||
1473 | 390 | 424 | ||
1474 | === modified file 'src/client/events/event_builders.cpp' | |||
1475 | --- src/client/events/event_builders.cpp 2016-11-11 06:59:42 +0000 | |||
1476 | +++ src/client/events/event_builders.cpp 2017-01-10 20:52:04 +0000 | |||
1477 | @@ -90,6 +90,17 @@ | |||
1478 | 90 | auto e = new_event<MirSurfaceEvent>(); | 90 | auto e = new_event<MirSurfaceEvent>(); |
1479 | 91 | 91 | ||
1480 | 92 | e->set_id(surface_id.as_value()); | 92 | e->set_id(surface_id.as_value()); |
1481 | 93 | e->set_attrib(static_cast<MirWindowAttrib>(attribute)); | ||
1482 | 94 | e->set_value(value); | ||
1483 | 95 | |||
1484 | 96 | return make_uptr_event(e); | ||
1485 | 97 | } | ||
1486 | 98 | |||
1487 | 99 | mir::EventUPtr mev::make_event(mf::SurfaceId const& surface_id, MirWindowAttrib attribute, int value) | ||
1488 | 100 | { | ||
1489 | 101 | auto e = new_event<MirSurfaceEvent>(); | ||
1490 | 102 | |||
1491 | 103 | e->set_id(surface_id.as_value()); | ||
1492 | 93 | e->set_attrib(attribute); | 104 | e->set_attrib(attribute); |
1493 | 94 | e->set_value(value); | 105 | e->set_value(value); |
1494 | 95 | 106 | ||
1495 | 96 | 107 | ||
1496 | === modified file 'src/client/mir_surface.cpp' | |||
1497 | --- src/client/mir_surface.cpp 2017-01-09 20:01:45 +0000 | |||
1498 | +++ src/client/mir_surface.cpp 2017-01-10 20:52:04 +0000 | |||
1499 | @@ -69,7 +69,7 @@ | |||
1500 | 69 | pixel_format{params.pixel_format}, | 69 | pixel_format{params.pixel_format}, |
1501 | 70 | buffer_usage{params.buffer_usage} | 70 | buffer_usage{params.buffer_usage} |
1502 | 71 | { | 71 | { |
1504 | 72 | type = mir_surface_type_normal; | 72 | type = mir_window_type_normal; |
1505 | 73 | if (params.output_id != mir_display_output_id_invalid) | 73 | if (params.output_id != mir_display_output_id_invalid) |
1506 | 74 | { | 74 | { |
1507 | 75 | output_id = params.output_id; | 75 | output_id = params.output_id; |
1508 | @@ -279,13 +279,13 @@ | |||
1509 | 279 | return &configure_cursor_wait_handle; | 279 | return &configure_cursor_wait_handle; |
1510 | 280 | } | 280 | } |
1511 | 281 | 281 | ||
1513 | 282 | MirWaitHandle* MirSurface::configure(MirSurfaceAttrib at, int value) | 282 | MirWaitHandle* MirSurface::configure(MirWindowAttrib at, int value) |
1514 | 283 | { | 283 | { |
1515 | 284 | // TODO: This is obviously strange. It should be | 284 | // TODO: This is obviously strange. It should be |
1516 | 285 | // possible to eliminate it in the second phase of buffer | 285 | // possible to eliminate it in the second phase of buffer |
1517 | 286 | // stream where the existing MirSurface swap interval functions | 286 | // stream where the existing MirSurface swap interval functions |
1518 | 287 | // may be deprecated in terms of mir_buffer_stream_ alternatives | 287 | // may be deprecated in terms of mir_buffer_stream_ alternatives |
1520 | 288 | if ((at == mir_surface_attrib_swapinterval) && default_stream) | 288 | if ((at == mir_window_attrib_swapinterval) && default_stream) |
1521 | 289 | { | 289 | { |
1522 | 290 | default_stream->set_swap_interval(value); | 290 | default_stream->set_swap_interval(value); |
1523 | 291 | return &configure_wait_handle; | 291 | return &configure_wait_handle; |
1524 | @@ -360,11 +360,11 @@ | |||
1525 | 360 | 360 | ||
1526 | 361 | switch (a) | 361 | switch (a) |
1527 | 362 | { | 362 | { |
1533 | 363 | case mir_surface_attrib_type: | 363 | case mir_window_attrib_type: |
1534 | 364 | case mir_surface_attrib_state: | 364 | case mir_window_attrib_state: |
1535 | 365 | case mir_surface_attrib_focus: | 365 | case mir_window_attrib_focus: |
1536 | 366 | case mir_surface_attrib_dpi: | 366 | case mir_window_attrib_dpi: |
1537 | 367 | case mir_surface_attrib_preferred_orientation: | 367 | case mir_window_attrib_preferred_orientation: |
1538 | 368 | if (configure_result->has_ivalue()) | 368 | if (configure_result->has_ivalue()) |
1539 | 369 | attrib_cache[a] = configure_result->ivalue(); | 369 | attrib_cache[a] = configure_result->ivalue(); |
1540 | 370 | else | 370 | else |
1541 | @@ -385,11 +385,11 @@ | |||
1542 | 385 | } | 385 | } |
1543 | 386 | 386 | ||
1544 | 387 | 387 | ||
1546 | 388 | int MirSurface::attrib(MirSurfaceAttrib at) const | 388 | int MirSurface::attrib(MirWindowAttrib at) const |
1547 | 389 | { | 389 | { |
1548 | 390 | std::lock_guard<decltype(mutex)> lock(mutex); | 390 | std::lock_guard<decltype(mutex)> lock(mutex); |
1549 | 391 | 391 | ||
1551 | 392 | if (at == mir_surface_attrib_swapinterval) | 392 | if (at == mir_window_attrib_swapinterval) |
1552 | 393 | { | 393 | { |
1553 | 394 | if (default_stream) | 394 | if (default_stream) |
1554 | 395 | return default_stream->swap_interval(); | 395 | return default_stream->swap_interval(); |
1555 | @@ -430,12 +430,12 @@ | |||
1556 | 430 | 430 | ||
1557 | 431 | switch (mir_event_get_type(&e)) | 431 | switch (mir_event_get_type(&e)) |
1558 | 432 | { | 432 | { |
1560 | 433 | case mir_event_type_surface: | 433 | case mir_event_type_window: |
1561 | 434 | { | 434 | { |
1566 | 435 | auto sev = mir_event_get_surface_event(&e); | 435 | auto sev = mir_event_get_window_event(&e); |
1567 | 436 | auto a = mir_surface_event_get_attribute(sev); | 436 | auto a = mir_window_event_get_attribute(sev); |
1568 | 437 | if (a < mir_surface_attribs) | 437 | if (a < mir_window_attribs) |
1569 | 438 | attrib_cache[a] = mir_surface_event_get_attribute_value(sev); | 438 | attrib_cache[a] = mir_window_event_get_attribute_value(sev); |
1570 | 439 | break; | 439 | break; |
1571 | 440 | } | 440 | } |
1572 | 441 | case mir_event_type_orientation: | 441 | case mir_event_type_orientation: |
1573 | @@ -470,7 +470,7 @@ | |||
1574 | 470 | } | 470 | } |
1575 | 471 | } | 471 | } |
1576 | 472 | 472 | ||
1578 | 473 | void MirSurface::request_and_wait_for_configure(MirSurfaceAttrib a, int value) | 473 | void MirSurface::request_and_wait_for_configure(MirWindowAttrib a, int value) |
1579 | 474 | { | 474 | { |
1580 | 475 | configure(a, value)->wait_for_all(); | 475 | configure(a, value)->wait_for_all(); |
1581 | 476 | } | 476 | } |
1582 | @@ -484,7 +484,7 @@ | |||
1583 | 484 | 484 | ||
1584 | 485 | MirWaitHandle* MirSurface::set_preferred_orientation(MirOrientationMode mode) | 485 | MirWaitHandle* MirSurface::set_preferred_orientation(MirOrientationMode mode) |
1585 | 486 | { | 486 | { |
1587 | 487 | return configure(mir_surface_attrib_preferred_orientation, mode); | 487 | return configure(mir_window_attrib_preferred_orientation, mode); |
1588 | 488 | } | 488 | } |
1589 | 489 | 489 | ||
1590 | 490 | void MirSurface::raise_surface(MirCookie const* cookie) | 490 | void MirSurface::raise_surface(MirCookie const* cookie) |
1591 | 491 | 491 | ||
1592 | === modified file 'src/client/mir_surface.h' | |||
1593 | --- src/client/mir_surface.h 2017-01-09 06:48:47 +0000 | |||
1594 | +++ src/client/mir_surface.h 2017-01-10 20:52:04 +0000 | |||
1595 | @@ -102,7 +102,7 @@ | |||
1596 | 102 | mir::optional_value<std::string> surface_name; | 102 | mir::optional_value<std::string> surface_name; |
1597 | 103 | mir::optional_value<uint32_t> output_id; | 103 | mir::optional_value<uint32_t> output_id; |
1598 | 104 | 104 | ||
1600 | 105 | mir::optional_value<MirSurfaceType> type; | 105 | mir::optional_value<MirWindowType> type; |
1601 | 106 | mir::optional_value<MirSurfaceState> state; | 106 | mir::optional_value<MirSurfaceState> state; |
1602 | 107 | mir::optional_value<MirOrientationMode> pref_orientation; | 107 | mir::optional_value<MirOrientationMode> pref_orientation; |
1603 | 108 | 108 | ||
1604 | @@ -183,7 +183,7 @@ | |||
1605 | 183 | char const * get_error_message(); | 183 | char const * get_error_message(); |
1606 | 184 | int id() const; | 184 | int id() const; |
1607 | 185 | 185 | ||
1609 | 186 | MirWaitHandle* configure(MirSurfaceAttrib a, int value); | 186 | MirWaitHandle* configure(MirWindowAttrib a, int value); |
1610 | 187 | 187 | ||
1611 | 188 | // TODO: Some sort of extension mechanism so that this can be moved | 188 | // TODO: Some sort of extension mechanism so that this can be moved |
1612 | 189 | // out into a separate class in the libmirclient-debug DSO. | 189 | // out into a separate class in the libmirclient-debug DSO. |
1613 | @@ -191,7 +191,7 @@ | |||
1614 | 191 | int* screen_x, int* screen_y); | 191 | int* screen_x, int* screen_y); |
1615 | 192 | 192 | ||
1616 | 193 | // Non-blocking | 193 | // Non-blocking |
1618 | 194 | int attrib(MirSurfaceAttrib a) const; | 194 | int attrib(MirWindowAttrib a) const; |
1619 | 195 | 195 | ||
1620 | 196 | MirOrientation get_orientation() const; | 196 | MirOrientation get_orientation() const; |
1621 | 197 | MirWaitHandle* set_preferred_orientation(MirOrientationMode mode); | 197 | MirWaitHandle* set_preferred_orientation(MirOrientationMode mode); |
1622 | @@ -204,7 +204,7 @@ | |||
1623 | 204 | void* context); | 204 | void* context); |
1624 | 205 | void handle_event(MirEvent const& e); | 205 | void handle_event(MirEvent const& e); |
1625 | 206 | 206 | ||
1627 | 207 | void request_and_wait_for_configure(MirSurfaceAttrib a, int value); | 207 | void request_and_wait_for_configure(MirWindowAttrib a, int value); |
1628 | 208 | 208 | ||
1629 | 209 | MirBufferStream* get_buffer_stream(); | 209 | MirBufferStream* get_buffer_stream(); |
1630 | 210 | 210 | ||
1631 | @@ -248,7 +248,7 @@ | |||
1632 | 248 | std::unique_ptr<mir::protobuf::SurfaceSetting> const configure_result; | 248 | std::unique_ptr<mir::protobuf::SurfaceSetting> const configure_result; |
1633 | 249 | 249 | ||
1634 | 250 | // Cache of latest SurfaceSettings returned from the server | 250 | // Cache of latest SurfaceSettings returned from the server |
1636 | 251 | int attrib_cache[mir_surface_attribs]; | 251 | int attrib_cache[mir_window_attribs]; |
1637 | 252 | MirOrientation orientation = mir_orientation_normal; | 252 | MirOrientation orientation = mir_orientation_normal; |
1638 | 253 | 253 | ||
1639 | 254 | std::function<void(MirEvent const*)> handle_event_callback; | 254 | std::function<void(MirEvent const*)> handle_event_callback; |
1640 | 255 | 255 | ||
1641 | === modified file 'src/client/mir_surface_api.cpp' | |||
1642 | --- src/client/mir_surface_api.cpp 2017-01-09 06:48:47 +0000 | |||
1643 | +++ src/client/mir_surface_api.cpp 2017-01-10 20:52:04 +0000 | |||
1644 | @@ -42,7 +42,7 @@ | |||
1645 | 42 | int width, int height) | 42 | int width, int height) |
1646 | 43 | { | 43 | { |
1647 | 44 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; | 44 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; |
1649 | 45 | spec->type = mir_surface_type_normal; | 45 | spec->type = mir_window_type_normal; |
1650 | 46 | return spec; | 46 | return spec; |
1651 | 47 | } | 47 | } |
1652 | 48 | 48 | ||
1653 | @@ -57,7 +57,7 @@ | |||
1654 | 57 | mir::require(rect != nullptr); | 57 | mir::require(rect != nullptr); |
1655 | 58 | 58 | ||
1656 | 59 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; | 59 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; |
1658 | 60 | spec->type = mir_surface_type_menu; | 60 | spec->type = mir_window_type_menu; |
1659 | 61 | spec->parent = parent; | 61 | spec->parent = parent; |
1660 | 62 | spec->aux_rect = *rect; | 62 | spec->aux_rect = *rect; |
1661 | 63 | spec->edge_attachment = edge; | 63 | spec->edge_attachment = edge; |
1662 | @@ -74,7 +74,7 @@ | |||
1663 | 74 | mir::require(rect != nullptr); | 74 | mir::require(rect != nullptr); |
1664 | 75 | 75 | ||
1665 | 76 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; | 76 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; |
1667 | 77 | spec->type = mir_surface_type_tip; | 77 | spec->type = mir_window_type_tip; |
1668 | 78 | spec->parent = parent; | 78 | spec->parent = parent; |
1669 | 79 | spec->aux_rect = *rect; | 79 | spec->aux_rect = *rect; |
1670 | 80 | spec->edge_attachment = edge; | 80 | spec->edge_attachment = edge; |
1671 | @@ -88,7 +88,7 @@ | |||
1672 | 88 | mir::require(mir_window_is_valid(parent)); | 88 | mir::require(mir_window_is_valid(parent)); |
1673 | 89 | 89 | ||
1674 | 90 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; | 90 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; |
1676 | 91 | spec->type = mir_surface_type_dialog; | 91 | spec->type = mir_window_type_dialog; |
1677 | 92 | spec->parent = parent; | 92 | spec->parent = parent; |
1678 | 93 | 93 | ||
1679 | 94 | return spec; | 94 | return spec; |
1680 | @@ -99,7 +99,7 @@ | |||
1681 | 99 | int width, int height) | 99 | int width, int height) |
1682 | 100 | { | 100 | { |
1683 | 101 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; | 101 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; |
1685 | 102 | spec->type = mir_surface_type_dialog; | 102 | spec->type = mir_window_type_dialog; |
1686 | 103 | return spec; | 103 | return spec; |
1687 | 104 | } | 104 | } |
1688 | 105 | 105 | ||
1689 | @@ -108,7 +108,7 @@ | |||
1690 | 108 | int width, int height) | 108 | int width, int height) |
1691 | 109 | { | 109 | { |
1692 | 110 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; | 110 | auto spec = new MirWindowSpec{connection, width, height, mir_pixel_format_invalid}; |
1694 | 111 | spec->type = mir_surface_type_inputmethod; | 111 | spec->type = mir_window_type_inputmethod; |
1695 | 112 | return spec; | 112 | return spec; |
1696 | 113 | } | 113 | } |
1697 | 114 | 114 | ||
1698 | @@ -137,7 +137,7 @@ | |||
1699 | 137 | MIR_LOG_UNCAUGHT_EXCEPTION(ex); | 137 | MIR_LOG_UNCAUGHT_EXCEPTION(ex); |
1700 | 138 | } | 138 | } |
1701 | 139 | 139 | ||
1703 | 140 | void mir_window_spec_set_type(MirWindowSpec* spec, MirSurfaceType type) | 140 | void mir_window_spec_set_type(MirWindowSpec* spec, MirWindowType type) |
1704 | 141 | try | 141 | try |
1705 | 142 | { | 142 | { |
1706 | 143 | mir::require(spec); | 143 | mir::require(spec); |
1707 | @@ -301,7 +301,7 @@ | |||
1708 | 301 | mir::require(attachment_rect != nullptr); | 301 | mir::require(attachment_rect != nullptr); |
1709 | 302 | 302 | ||
1710 | 303 | if (!spec->type.is_set() || | 303 | if (!spec->type.is_set() || |
1712 | 304 | spec->type.value() != mir_surface_type_inputmethod) | 304 | spec->type.value() != mir_window_type_inputmethod) |
1713 | 305 | { | 305 | { |
1714 | 306 | return false; | 306 | return false; |
1715 | 307 | } | 307 | } |
1716 | @@ -624,6 +624,22 @@ | |||
1717 | 624 | } | 624 | } |
1718 | 625 | } | 625 | } |
1719 | 626 | 626 | ||
1720 | 627 | MirWindowType mir_window_get_type(MirWindow* window) | ||
1721 | 628 | { | ||
1722 | 629 | MirWindowType type = mir_window_type_normal; | ||
1723 | 630 | |||
1724 | 631 | if (window) | ||
1725 | 632 | { | ||
1726 | 633 | // Only the client will ever change the type of a window so it is | ||
1727 | 634 | // safe to get the type from a local cache surf->attrib(). | ||
1728 | 635 | |||
1729 | 636 | int t = window->attrib(mir_window_attrib_type); | ||
1730 | 637 | type = static_cast<MirWindowType>(t); | ||
1731 | 638 | } | ||
1732 | 639 | |||
1733 | 640 | return type; | ||
1734 | 641 | } | ||
1735 | 642 | |||
1736 | 627 | // These functions will be deprecated soon | 643 | // These functions will be deprecated soon |
1737 | 628 | //#pragma GCC diagnostic push | 644 | //#pragma GCC diagnostic push |
1738 | 629 | //#pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 645 | //#pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
1739 | @@ -887,7 +903,7 @@ | |||
1740 | 887 | 903 | ||
1741 | 888 | void mir_surface_spec_set_type(MirSurfaceSpec* spec, MirSurfaceType type) | 904 | void mir_surface_spec_set_type(MirSurfaceSpec* spec, MirSurfaceType type) |
1742 | 889 | { | 905 | { |
1744 | 890 | mir_window_spec_set_type(spec, type); | 906 | mir_window_spec_set_type(spec, static_cast<MirWindowType>(type)); |
1745 | 891 | } | 907 | } |
1746 | 892 | 908 | ||
1747 | 893 | void mir_surface_spec_set_width_increment(MirSurfaceSpec* spec, unsigned width_inc) | 909 | void mir_surface_spec_set_width_increment(MirSurfaceSpec* spec, unsigned width_inc) |
1748 | @@ -976,25 +992,14 @@ | |||
1749 | 976 | 992 | ||
1750 | 977 | MirSurfaceType mir_surface_get_type(MirSurface* surf) | 993 | MirSurfaceType mir_surface_get_type(MirSurface* surf) |
1751 | 978 | { | 994 | { |
1764 | 979 | MirSurfaceType type = mir_surface_type_normal; | 995 | return static_cast<MirSurfaceType>(mir_window_get_type(surf)); |
1753 | 980 | |||
1754 | 981 | if (surf) | ||
1755 | 982 | { | ||
1756 | 983 | // Only the client will ever change the type of a surface so it is | ||
1757 | 984 | // safe to get the type from a local cache surf->attrib(). | ||
1758 | 985 | |||
1759 | 986 | int t = surf->attrib(mir_surface_attrib_type); | ||
1760 | 987 | type = static_cast<MirSurfaceType>(t); | ||
1761 | 988 | } | ||
1762 | 989 | |||
1763 | 990 | return type; | ||
1765 | 991 | } | 996 | } |
1766 | 992 | 997 | ||
1767 | 993 | MirWaitHandle* mir_surface_set_state(MirSurface* surf, MirSurfaceState state) | 998 | MirWaitHandle* mir_surface_set_state(MirSurface* surf, MirSurfaceState state) |
1768 | 994 | { | 999 | { |
1769 | 995 | try | 1000 | try |
1770 | 996 | { | 1001 | { |
1772 | 997 | return surf ? surf->configure(mir_surface_attrib_state, state) : nullptr; | 1002 | return surf ? surf->configure(mir_window_attrib_state, state) : nullptr; |
1773 | 998 | } | 1003 | } |
1774 | 999 | catch (std::exception const& ex) | 1004 | catch (std::exception const& ex) |
1775 | 1000 | { | 1005 | { |
1776 | @@ -1011,13 +1016,13 @@ | |||
1777 | 1011 | { | 1016 | { |
1778 | 1012 | if (surf) | 1017 | if (surf) |
1779 | 1013 | { | 1018 | { |
1781 | 1014 | int s = surf->attrib(mir_surface_attrib_state); | 1019 | int s = surf->attrib(mir_window_attrib_state); |
1782 | 1015 | 1020 | ||
1783 | 1016 | if (s == mir_surface_state_unknown) | 1021 | if (s == mir_surface_state_unknown) |
1784 | 1017 | { | 1022 | { |
1786 | 1018 | surf->configure(mir_surface_attrib_state, | 1023 | surf->configure(mir_window_attrib_state, |
1787 | 1019 | mir_surface_state_unknown)->wait_for_all(); | 1024 | mir_surface_state_unknown)->wait_for_all(); |
1789 | 1020 | s = surf->attrib(mir_surface_attrib_state); | 1025 | s = surf->attrib(mir_window_attrib_state); |
1790 | 1021 | } | 1026 | } |
1791 | 1022 | 1027 | ||
1792 | 1023 | state = static_cast<MirSurfaceState>(s); | 1028 | state = static_cast<MirSurfaceState>(s); |
1793 | @@ -1085,7 +1090,7 @@ | |||
1794 | 1085 | { | 1090 | { |
1795 | 1086 | if (surf) | 1091 | if (surf) |
1796 | 1087 | { | 1092 | { |
1798 | 1088 | dpi = surf->attrib(mir_surface_attrib_dpi); | 1093 | dpi = surf->attrib(mir_window_attrib_dpi); |
1799 | 1089 | } | 1094 | } |
1800 | 1090 | } | 1095 | } |
1801 | 1091 | catch (std::exception const& ex) | 1096 | catch (std::exception const& ex) |
1802 | @@ -1104,7 +1109,7 @@ | |||
1803 | 1104 | { | 1109 | { |
1804 | 1105 | if (surf) | 1110 | if (surf) |
1805 | 1106 | { | 1111 | { |
1807 | 1107 | state = static_cast<MirSurfaceFocusState>(surf->attrib(mir_surface_attrib_focus)); | 1112 | state = static_cast<MirSurfaceFocusState>(surf->attrib(mir_window_attrib_focus)); |
1808 | 1108 | } | 1113 | } |
1809 | 1109 | } | 1114 | } |
1810 | 1110 | catch (std::exception const& ex) | 1115 | catch (std::exception const& ex) |
1811 | @@ -1123,7 +1128,7 @@ | |||
1812 | 1123 | { | 1128 | { |
1813 | 1124 | if (surf) | 1129 | if (surf) |
1814 | 1125 | { | 1130 | { |
1816 | 1126 | state = static_cast<MirSurfaceVisibility>(surf->attrib(mir_surface_attrib_visibility)); | 1131 | state = static_cast<MirSurfaceVisibility>(surf->attrib(mir_window_attrib_visibility)); |
1817 | 1127 | } | 1132 | } |
1818 | 1128 | } | 1133 | } |
1819 | 1129 | catch (std::exception const& ex) | 1134 | catch (std::exception const& ex) |
1820 | @@ -1159,7 +1164,7 @@ | |||
1821 | 1159 | 1164 | ||
1822 | 1160 | try | 1165 | try |
1823 | 1161 | { | 1166 | { |
1825 | 1162 | mode = static_cast<MirOrientationMode>(surf->attrib(mir_surface_attrib_preferred_orientation)); | 1167 | mode = static_cast<MirOrientationMode>(surf->attrib(mir_window_attrib_preferred_orientation)); |
1826 | 1163 | } | 1168 | } |
1827 | 1164 | catch (std::exception const& ex) | 1169 | catch (std::exception const& ex) |
1828 | 1165 | { | 1170 | { |
1829 | 1166 | 1171 | ||
1830 | === modified file 'src/client/rpc/mir_protobuf_rpc_channel.cpp' | |||
1831 | --- src/client/rpc/mir_protobuf_rpc_channel.cpp 2017-01-06 05:29:00 +0000 | |||
1832 | +++ src/client/rpc/mir_protobuf_rpc_channel.cpp 2017-01-10 20:52:04 +0000 | |||
1833 | @@ -400,7 +400,7 @@ | |||
1834 | 400 | 400 | ||
1835 | 401 | switch (e->type()) | 401 | switch (e->type()) |
1836 | 402 | { | 402 | { |
1838 | 403 | case mir_event_type_surface: | 403 | case mir_event_type_window: |
1839 | 404 | surface_id = e->to_surface()->id(); | 404 | surface_id = e->to_surface()->id(); |
1840 | 405 | break; | 405 | break; |
1841 | 406 | case mir_event_type_resize: | 406 | case mir_event_type_resize: |
1842 | @@ -409,16 +409,16 @@ | |||
1843 | 409 | case mir_event_type_orientation: | 409 | case mir_event_type_orientation: |
1844 | 410 | surface_id = e->to_orientation()->surface_id(); | 410 | surface_id = e->to_orientation()->surface_id(); |
1845 | 411 | break; | 411 | break; |
1847 | 412 | case mir_event_type_close_surface: | 412 | case mir_event_type_close_window: |
1848 | 413 | surface_id = e->to_close_surface()->surface_id(); | 413 | surface_id = e->to_close_surface()->surface_id(); |
1849 | 414 | break; | 414 | break; |
1850 | 415 | case mir_event_type_keymap: | 415 | case mir_event_type_keymap: |
1851 | 416 | surface_id = e->to_keymap()->surface_id(); | 416 | surface_id = e->to_keymap()->surface_id(); |
1852 | 417 | break; | 417 | break; |
1854 | 418 | case mir_event_type_surface_output: | 418 | case mir_event_type_window_output: |
1855 | 419 | surface_id = e->to_surface_output()->surface_id(); | 419 | surface_id = e->to_surface_output()->surface_id(); |
1856 | 420 | break; | 420 | break; |
1858 | 421 | case mir_event_type_surface_placement: | 421 | case mir_event_type_window_placement: |
1859 | 422 | surface_id = e->to_surface_placement()->id(); | 422 | surface_id = e->to_surface_placement()->id(); |
1860 | 423 | break; | 423 | break; |
1861 | 424 | default: | 424 | default: |
1862 | 425 | 425 | ||
1863 | === modified file 'src/client/screencast_stream.cpp' | |||
1864 | --- src/client/screencast_stream.cpp 2017-01-09 06:48:47 +0000 | |||
1865 | +++ src/client/screencast_stream.cpp 2017-01-10 20:52:04 +0000 | |||
1866 | @@ -254,7 +254,7 @@ | |||
1867 | 254 | BOOST_THROW_EXCEPTION(std::logic_error("Attempt to set cache size on screencast is invalid")); | 254 | BOOST_THROW_EXCEPTION(std::logic_error("Attempt to set cache size on screencast is invalid")); |
1868 | 255 | } | 255 | } |
1869 | 256 | 256 | ||
1871 | 257 | void mcl::ScreencastStream::request_and_wait_for_configure(MirSurfaceAttrib, int) | 257 | void mcl::ScreencastStream::request_and_wait_for_configure(MirWindowAttrib, int) |
1872 | 258 | { | 258 | { |
1873 | 259 | BOOST_THROW_EXCEPTION(std::logic_error("Attempt to set attrib on screencast is invalid")); | 259 | BOOST_THROW_EXCEPTION(std::logic_error("Attempt to set attrib on screencast is invalid")); |
1874 | 260 | } | 260 | } |
1875 | 261 | 261 | ||
1876 | === modified file 'src/client/screencast_stream.h' | |||
1877 | --- src/client/screencast_stream.h 2017-01-09 06:48:47 +0000 | |||
1878 | +++ src/client/screencast_stream.h 2017-01-10 20:52:04 +0000 | |||
1879 | @@ -84,7 +84,7 @@ | |||
1880 | 84 | std::shared_ptr<MemoryRegion> secure_for_cpu_write() override; | 84 | std::shared_ptr<MemoryRegion> secure_for_cpu_write() override; |
1881 | 85 | 85 | ||
1882 | 86 | void swap_buffers_sync() override; | 86 | void swap_buffers_sync() override; |
1884 | 87 | void request_and_wait_for_configure(MirSurfaceAttrib attrib, int) override; | 87 | void request_and_wait_for_configure(MirWindowAttrib attrib, int) override; |
1885 | 88 | MirNativeBuffer* get_current_buffer_package() override; | 88 | MirNativeBuffer* get_current_buffer_package() override; |
1886 | 89 | MirPlatformType platform_type() override; | 89 | MirPlatformType platform_type() override; |
1887 | 90 | 90 | ||
1888 | 91 | 91 | ||
1889 | === modified file 'src/client/symbols.map' | |||
1890 | --- src/client/symbols.map 2017-01-09 06:48:47 +0000 | |||
1891 | +++ src/client/symbols.map 2017-01-10 20:52:04 +0000 | |||
1892 | @@ -550,4 +550,16 @@ | |||
1893 | 550 | mir_window_get_parameters; | 550 | mir_window_get_parameters; |
1894 | 551 | mir_window_get_orientation; | 551 | mir_window_get_orientation; |
1895 | 552 | mir_window_raise; | 552 | mir_window_raise; |
1896 | 553 | mir_event_get_window_event; | ||
1897 | 554 | mir_window_event_get_attribute; | ||
1898 | 555 | mir_window_event_get_attribute_value; | ||
1899 | 556 | mir_window_get_type; | ||
1900 | 557 | mir_event_get_window_output_event; | ||
1901 | 558 | mir_window_output_event_get_dpi; | ||
1902 | 559 | mir_window_output_event_get_form_factor; | ||
1903 | 560 | mir_window_output_event_get_scale; | ||
1904 | 561 | mir_window_output_event_get_output_id; | ||
1905 | 562 | mir_window_output_event_get_refresh_rate; | ||
1906 | 563 | mir_event_get_window_placement_event; | ||
1907 | 564 | mir_window_placement_get_relative_position; | ||
1908 | 553 | } MIR_CLIENT_0.25; | 565 | } MIR_CLIENT_0.25; |
1909 | 554 | 566 | ||
1910 | === modified file 'src/common/events/event.cpp' | |||
1911 | --- src/common/events/event.cpp 2016-11-11 07:56:09 +0000 | |||
1912 | +++ src/common/events/event.cpp 2017-01-10 20:52:04 +0000 | |||
1913 | @@ -82,7 +82,7 @@ | |||
1914 | 82 | case mir::capnp::Event::Which::INPUT: | 82 | case mir::capnp::Event::Which::INPUT: |
1915 | 83 | return mir_event_type_input; | 83 | return mir_event_type_input; |
1916 | 84 | case mir::capnp::Event::Which::SURFACE: | 84 | case mir::capnp::Event::Which::SURFACE: |
1918 | 85 | return mir_event_type_surface; | 85 | return mir_event_type_window; |
1919 | 86 | case mir::capnp::Event::Which::RESIZE: | 86 | case mir::capnp::Event::Which::RESIZE: |
1920 | 87 | return mir_event_type_resize; | 87 | return mir_event_type_resize; |
1921 | 88 | case mir::capnp::Event::Which::PROMPT_SESSION: | 88 | case mir::capnp::Event::Which::PROMPT_SESSION: |
1922 | @@ -90,7 +90,7 @@ | |||
1923 | 90 | case mir::capnp::Event::Which::ORIENTATION: | 90 | case mir::capnp::Event::Which::ORIENTATION: |
1924 | 91 | return mir_event_type_orientation; | 91 | return mir_event_type_orientation; |
1925 | 92 | case mir::capnp::Event::Which::CLOSE_SURFACE: | 92 | case mir::capnp::Event::Which::CLOSE_SURFACE: |
1927 | 93 | return mir_event_type_close_surface; | 93 | return mir_event_type_close_window; |
1928 | 94 | case mir::capnp::Event::Which::KEYMAP: | 94 | case mir::capnp::Event::Which::KEYMAP: |
1929 | 95 | return mir_event_type_keymap; | 95 | return mir_event_type_keymap; |
1930 | 96 | #pragma GCC diagnostic push | 96 | #pragma GCC diagnostic push |
1931 | @@ -99,11 +99,11 @@ | |||
1932 | 99 | return mir_event_type_input_configuration; | 99 | return mir_event_type_input_configuration; |
1933 | 100 | #pragma GCC diagnostic pop | 100 | #pragma GCC diagnostic pop |
1934 | 101 | case mir::capnp::Event::Which::SURFACE_OUTPUT: | 101 | case mir::capnp::Event::Which::SURFACE_OUTPUT: |
1936 | 102 | return mir_event_type_surface_output; | 102 | return mir_event_type_window_output; |
1937 | 103 | case mir::capnp::Event::Which::INPUT_DEVICE: | 103 | case mir::capnp::Event::Which::INPUT_DEVICE: |
1938 | 104 | return mir_event_type_input_device_state; | 104 | return mir_event_type_input_device_state; |
1939 | 105 | case mir::capnp::Event::Which::SURFACE_PLACEMENT: | 105 | case mir::capnp::Event::Which::SURFACE_PLACEMENT: |
1941 | 106 | return mir_event_type_surface_placement; | 106 | return mir_event_type_window_placement; |
1942 | 107 | default: | 107 | default: |
1943 | 108 | mir::log_critical("unknown event type."); | 108 | mir::log_critical("unknown event type."); |
1944 | 109 | abort(); | 109 | abort(); |
1945 | @@ -133,14 +133,14 @@ | |||
1946 | 133 | } | 133 | } |
1947 | 134 | #pragma GCC diagnostic pop | 134 | #pragma GCC diagnostic pop |
1948 | 135 | 135 | ||
1950 | 136 | MirSurfaceEvent* MirEvent::to_surface() | 136 | MirWindowEvent* MirEvent::to_surface() |
1951 | 137 | { | 137 | { |
1953 | 138 | return static_cast<MirSurfaceEvent*>(this); | 138 | return static_cast<MirWindowEvent*>(this); |
1954 | 139 | } | 139 | } |
1955 | 140 | 140 | ||
1957 | 141 | MirSurfaceEvent const* MirEvent::to_surface() const | 141 | MirWindowEvent const* MirEvent::to_surface() const |
1958 | 142 | { | 142 | { |
1960 | 143 | return static_cast<MirSurfaceEvent const*>(this); | 143 | return static_cast<MirWindowEvent const*>(this); |
1961 | 144 | } | 144 | } |
1962 | 145 | 145 | ||
1963 | 146 | MirResizeEvent* MirEvent::to_resize() | 146 | MirResizeEvent* MirEvent::to_resize() |
1964 | 147 | 147 | ||
1965 | === modified file 'src/common/events/surface_event.cpp' | |||
1966 | --- src/common/events/surface_event.cpp 2016-10-31 02:37:31 +0000 | |||
1967 | +++ src/common/events/surface_event.cpp 2017-01-10 20:52:04 +0000 | |||
1968 | @@ -33,12 +33,12 @@ | |||
1969 | 33 | event.getSurface().setId(id); | 33 | event.getSurface().setId(id); |
1970 | 34 | } | 34 | } |
1971 | 35 | 35 | ||
1973 | 36 | MirSurfaceAttrib MirSurfaceEvent::attrib() const | 36 | MirWindowAttrib MirSurfaceEvent::attrib() const |
1974 | 37 | { | 37 | { |
1976 | 38 | return static_cast<MirSurfaceAttrib>(event.asReader().getSurface().getAttrib()); | 38 | return static_cast<MirWindowAttrib>(event.asReader().getSurface().getAttrib()); |
1977 | 39 | } | 39 | } |
1978 | 40 | 40 | ||
1980 | 41 | void MirSurfaceEvent::set_attrib(MirSurfaceAttrib attrib) | 41 | void MirSurfaceEvent::set_attrib(MirWindowAttrib attrib) |
1981 | 42 | { | 42 | { |
1982 | 43 | event.getSurface().setAttrib(static_cast<mir::capnp::SurfaceEvent::Attrib>(attrib)); | 43 | event.getSurface().setAttrib(static_cast<mir::capnp::SurfaceEvent::Attrib>(attrib)); |
1983 | 44 | } | 44 | } |
1984 | 45 | 45 | ||
1985 | === modified file 'src/include/client/mir/egl_native_surface.h' | |||
1986 | --- src/include/client/mir/egl_native_surface.h 2017-01-09 06:48:47 +0000 | |||
1987 | +++ src/include/client/mir/egl_native_surface.h 2017-01-10 20:52:04 +0000 | |||
1988 | @@ -34,7 +34,7 @@ | |||
1989 | 34 | virtual MirWindowParameters get_parameters() const = 0; | 34 | virtual MirWindowParameters get_parameters() const = 0; |
1990 | 35 | virtual std::shared_ptr<ClientBuffer> get_current_buffer() = 0; | 35 | virtual std::shared_ptr<ClientBuffer> get_current_buffer() = 0; |
1991 | 36 | virtual void swap_buffers_sync() = 0; | 36 | virtual void swap_buffers_sync() = 0; |
1993 | 37 | virtual void request_and_wait_for_configure(MirSurfaceAttrib a, int value) = 0; | 37 | virtual void request_and_wait_for_configure(MirWindowAttrib a, int value) = 0; |
1994 | 38 | virtual void set_buffer_cache_size(unsigned int) = 0; | 38 | virtual void set_buffer_cache_size(unsigned int) = 0; |
1995 | 39 | 39 | ||
1996 | 40 | protected: | 40 | protected: |
1997 | 41 | 41 | ||
1998 | === modified file 'src/include/common/mir/events/event.h' | |||
1999 | --- src/include/common/mir/events/event.h 2016-11-11 06:59:42 +0000 | |||
2000 | +++ src/include/common/mir/events/event.h 2017-01-10 20:52:04 +0000 | |||
2001 | @@ -40,8 +40,8 @@ | |||
2002 | 40 | MirInputConfigurationEvent* to_input_configuration(); | 40 | MirInputConfigurationEvent* to_input_configuration(); |
2003 | 41 | MirInputConfigurationEvent const* to_input_configuration() const; | 41 | MirInputConfigurationEvent const* to_input_configuration() const; |
2004 | 42 | 42 | ||
2007 | 43 | MirSurfaceEvent* to_surface(); | 43 | MirWindowEvent* to_surface(); |
2008 | 44 | MirSurfaceEvent const* to_surface() const; | 44 | MirWindowEvent const* to_surface() const; |
2009 | 45 | 45 | ||
2010 | 46 | MirResizeEvent* to_resize(); | 46 | MirResizeEvent* to_resize(); |
2011 | 47 | MirResizeEvent const* to_resize() const; | 47 | MirResizeEvent const* to_resize() const; |
2012 | 48 | 48 | ||
2013 | === modified file 'src/include/common/mir/events/surface_event.h' | |||
2014 | --- src/include/common/mir/events/surface_event.h 2016-10-31 02:37:31 +0000 | |||
2015 | +++ src/include/common/mir/events/surface_event.h 2017-01-10 20:52:04 +0000 | |||
2016 | @@ -28,8 +28,8 @@ | |||
2017 | 28 | int id() const; | 28 | int id() const; |
2018 | 29 | void set_id(int id); | 29 | void set_id(int id); |
2019 | 30 | 30 | ||
2022 | 31 | MirSurfaceAttrib attrib() const; | 31 | MirWindowAttrib attrib() const; |
2023 | 32 | void set_attrib(MirSurfaceAttrib attrib); | 32 | void set_attrib(MirWindowAttrib attrib); |
2024 | 33 | 33 | ||
2025 | 34 | int value() const; | 34 | int value() const; |
2026 | 35 | void set_value(int value); | 35 | void set_value(int value); |
2027 | 36 | 36 | ||
2028 | === modified file 'src/include/common/mir/events/surface_output_event.h' | |||
2029 | --- src/include/common/mir/events/surface_output_event.h 2016-11-11 06:59:42 +0000 | |||
2030 | +++ src/include/common/mir/events/surface_output_event.h 2017-01-10 20:52:04 +0000 | |||
2031 | @@ -23,8 +23,6 @@ | |||
2032 | 23 | 23 | ||
2033 | 24 | #include "mir/events/event.h" | 24 | #include "mir/events/event.h" |
2034 | 25 | 25 | ||
2035 | 26 | // XXX This is a private structure so why are its members kept private? | ||
2036 | 27 | // What's the point in having all the getters and setters? | ||
2037 | 28 | struct MirSurfaceOutputEvent : MirEvent | 26 | struct MirSurfaceOutputEvent : MirEvent |
2038 | 29 | { | 27 | { |
2039 | 30 | MirSurfaceOutputEvent(); | 28 | MirSurfaceOutputEvent(); |
2040 | 31 | 29 | ||
2041 | === modified file 'src/include/server/mir/frontend/shell.h' | |||
2042 | --- src/include/server/mir/frontend/shell.h 2016-01-29 08:18:22 +0000 | |||
2043 | +++ src/include/server/mir/frontend/shell.h 2017-01-10 20:52:04 +0000 | |||
2044 | @@ -74,13 +74,13 @@ | |||
2045 | 74 | virtual int set_surface_attribute( | 74 | virtual int set_surface_attribute( |
2046 | 75 | std::shared_ptr<Session> const& session, | 75 | std::shared_ptr<Session> const& session, |
2047 | 76 | SurfaceId surface_id, | 76 | SurfaceId surface_id, |
2049 | 77 | MirSurfaceAttrib attrib, | 77 | MirWindowAttrib attrib, |
2050 | 78 | int value) = 0; | 78 | int value) = 0; |
2051 | 79 | 79 | ||
2052 | 80 | virtual int get_surface_attribute( | 80 | virtual int get_surface_attribute( |
2053 | 81 | std::shared_ptr<Session> const& session, | 81 | std::shared_ptr<Session> const& session, |
2054 | 82 | SurfaceId surface_id, | 82 | SurfaceId surface_id, |
2056 | 83 | MirSurfaceAttrib attrib) = 0; | 83 | MirWindowAttrib attrib) = 0; |
2057 | 84 | 84 | ||
2058 | 85 | virtual void raise_surface( | 85 | virtual void raise_surface( |
2059 | 86 | std::shared_ptr<Session> const& session, | 86 | std::shared_ptr<Session> const& session, |
2060 | 87 | 87 | ||
2061 | === modified file 'src/include/server/mir/scene/surface_event_source.h' | |||
2062 | --- src/include/server/mir/scene/surface_event_source.h 2016-10-31 02:37:31 +0000 | |||
2063 | +++ src/include/server/mir/scene/surface_event_source.h 2017-01-10 20:52:04 +0000 | |||
2064 | @@ -42,7 +42,7 @@ | |||
2065 | 42 | OutputPropertiesCache const& outputs, | 42 | OutputPropertiesCache const& outputs, |
2066 | 43 | std::shared_ptr<frontend::EventSink> const& event_sink); | 43 | std::shared_ptr<frontend::EventSink> const& event_sink); |
2067 | 44 | 44 | ||
2069 | 45 | void attrib_changed(MirSurfaceAttrib attrib, int value) override; | 45 | void attrib_changed(MirWindowAttrib attrib, int value) override; |
2070 | 46 | void resized_to(geometry::Size const& size) override; | 46 | void resized_to(geometry::Size const& size) override; |
2071 | 47 | void moved_to(geometry::Point const& top_left) override; | 47 | void moved_to(geometry::Point const& top_left) override; |
2072 | 48 | void orientation_set_to(MirOrientation orientation) override; | 48 | void orientation_set_to(MirOrientation orientation) override; |
2073 | 49 | 49 | ||
2074 | === modified file 'src/include/server/mir/scene/surface_observers.h' | |||
2075 | --- src/include/server/mir/scene/surface_observers.h 2016-10-31 02:37:31 +0000 | |||
2076 | +++ src/include/server/mir/scene/surface_observers.h 2017-01-10 20:52:04 +0000 | |||
2077 | @@ -34,7 +34,7 @@ | |||
2078 | 34 | using BasicObservers<SurfaceObserver>::remove; | 34 | using BasicObservers<SurfaceObserver>::remove; |
2079 | 35 | using BasicObservers<SurfaceObserver>::for_each; | 35 | using BasicObservers<SurfaceObserver>::for_each; |
2080 | 36 | 36 | ||
2082 | 37 | void attrib_changed(MirSurfaceAttrib attrib, int value) override; | 37 | void attrib_changed(MirWindowAttrib attrib, int value) override; |
2083 | 38 | void resized_to(geometry::Size const& size) override; | 38 | void resized_to(geometry::Size const& size) override; |
2084 | 39 | void moved_to(geometry::Point const& top_left) override; | 39 | void moved_to(geometry::Point const& top_left) override; |
2085 | 40 | void hidden_set_to(bool hide) override; | 40 | void hidden_set_to(bool hide) override; |
2086 | 41 | 41 | ||
2087 | === modified file 'src/include/server/mir/shell/basic_window_manager.h' | |||
2088 | --- src/include/server/mir/shell/basic_window_manager.h 2016-07-18 07:38:38 +0000 | |||
2089 | +++ src/include/server/mir/shell/basic_window_manager.h 2017-01-10 20:52:04 +0000 | |||
2090 | @@ -166,7 +166,7 @@ | |||
2091 | 166 | int set_surface_attribute( | 166 | int set_surface_attribute( |
2092 | 167 | std::shared_ptr<scene::Session> const& /*session*/, | 167 | std::shared_ptr<scene::Session> const& /*session*/, |
2093 | 168 | std::shared_ptr<scene::Surface> const& surface, | 168 | std::shared_ptr<scene::Surface> const& surface, |
2095 | 169 | MirSurfaceAttrib attrib, | 169 | MirWindowAttrib attrib, |
2096 | 170 | int value) override; | 170 | int value) override; |
2097 | 171 | 171 | ||
2098 | 172 | auto find_session(std::function<bool(SessionInfo const& info)> const& predicate) | 172 | auto find_session(std::function<bool(SessionInfo const& info)> const& predicate) |
2099 | 173 | 173 | ||
2100 | === modified file 'src/include/server/mir/shell/window_management_info.h' | |||
2101 | --- src/include/server/mir/shell/window_management_info.h 2016-06-20 17:10:33 +0000 | |||
2102 | +++ src/include/server/mir/shell/window_management_info.h 2017-01-10 20:52:04 +0000 | |||
2103 | @@ -39,7 +39,7 @@ | |||
2104 | 39 | 39 | ||
2105 | 40 | bool can_be_active() const; | 40 | bool can_be_active() const; |
2106 | 41 | 41 | ||
2108 | 42 | bool can_morph_to(MirSurfaceType new_type) const; | 42 | bool can_morph_to(MirWindowType new_type) const; |
2109 | 43 | 43 | ||
2110 | 44 | bool must_have_parent() const; | 44 | bool must_have_parent() const; |
2111 | 45 | 45 | ||
2112 | @@ -47,7 +47,7 @@ | |||
2113 | 47 | 47 | ||
2114 | 48 | bool is_visible() const; | 48 | bool is_visible() const; |
2115 | 49 | 49 | ||
2117 | 50 | static bool needs_titlebar(MirSurfaceType type); | 50 | static bool needs_titlebar(MirWindowType type); |
2118 | 51 | 51 | ||
2119 | 52 | void constrain_resize( | 52 | void constrain_resize( |
2120 | 53 | std::shared_ptr <scene::Surface> const& surface, | 53 | std::shared_ptr <scene::Surface> const& surface, |
2121 | @@ -57,7 +57,7 @@ | |||
2122 | 57 | const bool top_resize, | 57 | const bool top_resize, |
2123 | 58 | geometry::Rectangle const& bounds) const; | 58 | geometry::Rectangle const& bounds) const; |
2124 | 59 | 59 | ||
2126 | 60 | MirSurfaceType type; | 60 | MirWindowType type; |
2127 | 61 | MirSurfaceState state; | 61 | MirSurfaceState state; |
2128 | 62 | geometry::Rectangle restore_rect; | 62 | geometry::Rectangle restore_rect; |
2129 | 63 | std::weak_ptr <scene::Session> session; | 63 | std::weak_ptr <scene::Session> session; |
2130 | 64 | 64 | ||
2131 | === modified file 'src/platforms/android/client/egl_native_surface_interpreter.cpp' | |||
2132 | --- src/platforms/android/client/egl_native_surface_interpreter.cpp 2016-12-09 02:54:31 +0000 | |||
2133 | +++ src/platforms/android/client/egl_native_surface_interpreter.cpp 2017-01-10 20:52:04 +0000 | |||
2134 | @@ -92,7 +92,7 @@ | |||
2135 | 92 | 92 | ||
2136 | 93 | void mcla::EGLNativeSurfaceInterpreter::sync_to_display(bool should_sync) | 93 | void mcla::EGLNativeSurfaceInterpreter::sync_to_display(bool should_sync) |
2137 | 94 | { | 94 | { |
2139 | 95 | surface.request_and_wait_for_configure(mir_surface_attrib_swapinterval, should_sync); | 95 | surface.request_and_wait_for_configure(mir_window_attrib_swapinterval, should_sync); |
2140 | 96 | } | 96 | } |
2141 | 97 | 97 | ||
2142 | 98 | void mcla::EGLNativeSurfaceInterpreter::dispatch_driver_request_buffer_count(unsigned int count) | 98 | void mcla::EGLNativeSurfaceInterpreter::dispatch_driver_request_buffer_count(unsigned int count) |
2143 | 99 | 99 | ||
2144 | === modified file 'src/platforms/mesa/client/native_surface.cpp' | |||
2145 | --- src/platforms/mesa/client/native_surface.cpp 2017-01-09 06:48:47 +0000 | |||
2146 | +++ src/platforms/mesa/client/native_surface.cpp 2017-01-10 20:52:04 +0000 | |||
2147 | @@ -116,7 +116,7 @@ | |||
2148 | 116 | if ((interval < 0) || (interval > 1)) | 116 | if ((interval < 0) || (interval > 1)) |
2149 | 117 | return MIR_MESA_FALSE; | 117 | return MIR_MESA_FALSE; |
2150 | 118 | 118 | ||
2152 | 119 | surface->request_and_wait_for_configure(mir_surface_attrib_swapinterval, interval); | 119 | surface->request_and_wait_for_configure(mir_window_attrib_swapinterval, interval); |
2153 | 120 | return MIR_MESA_TRUE; | 120 | return MIR_MESA_TRUE; |
2154 | 121 | } | 121 | } |
2155 | 122 | catch (std::exception const& e) | 122 | catch (std::exception const& e) |
2156 | 123 | 123 | ||
2157 | === modified file 'src/server/frontend/session_mediator.cpp' | |||
2158 | --- src/server/frontend/session_mediator.cpp 2016-12-23 15:33:03 +0000 | |||
2159 | +++ src/server/frontend/session_mediator.cpp 2017-01-10 20:52:04 +0000 | |||
2160 | @@ -241,7 +241,7 @@ | |||
2161 | 241 | params.with_output_id(graphics::DisplayConfigurationOutputId(request->output_id())); | 241 | params.with_output_id(graphics::DisplayConfigurationOutputId(request->output_id())); |
2162 | 242 | 242 | ||
2163 | 243 | if (request->has_type()) | 243 | if (request->has_type()) |
2165 | 244 | params.of_type(static_cast<MirSurfaceType>(request->type())); | 244 | params.of_type(static_cast<MirWindowType>(request->type())); |
2166 | 245 | 245 | ||
2167 | 246 | if (request->has_state()) | 246 | if (request->has_state()) |
2168 | 247 | params.with_state(static_cast<MirSurfaceState>(request->state())); | 247 | params.with_state(static_cast<MirSurfaceState>(request->state())); |
2169 | @@ -350,13 +350,13 @@ | |||
2170 | 350 | if (surface->supports_input()) | 350 | if (surface->supports_input()) |
2171 | 351 | response->add_fd(surface->client_input_fd()); | 351 | response->add_fd(surface->client_input_fd()); |
2172 | 352 | 352 | ||
2174 | 353 | for (unsigned int i = 0; i < mir_surface_attribs; i++) | 353 | for (unsigned int i = 0; i < mir_window_attribs; i++) |
2175 | 354 | { | 354 | { |
2176 | 355 | auto setting = response->add_attributes(); | 355 | auto setting = response->add_attributes(); |
2177 | 356 | 356 | ||
2178 | 357 | setting->mutable_surfaceid()->set_value(surf_id.as_value()); | 357 | setting->mutable_surfaceid()->set_value(surf_id.as_value()); |
2179 | 358 | setting->set_attrib(i); | 358 | setting->set_attrib(i); |
2181 | 359 | setting->set_ivalue(shell->get_surface_attribute(session, surf_id, static_cast<MirSurfaceAttrib>(i))); | 359 | setting->set_ivalue(shell->get_surface_attribute(session, surf_id, static_cast<MirWindowAttrib>(i))); |
2182 | 360 | } | 360 | } |
2183 | 361 | 361 | ||
2184 | 362 | if (legacy_stream) | 362 | if (legacy_stream) |
2185 | @@ -508,7 +508,7 @@ | |||
2186 | 508 | mir::protobuf::SurfaceSetting* response, | 508 | mir::protobuf::SurfaceSetting* response, |
2187 | 509 | google::protobuf::Closure* done) | 509 | google::protobuf::Closure* done) |
2188 | 510 | { | 510 | { |
2190 | 511 | MirSurfaceAttrib attrib = static_cast<MirSurfaceAttrib>(request->attrib()); | 511 | auto attrib = static_cast<MirWindowAttrib>(request->attrib()); |
2191 | 512 | 512 | ||
2192 | 513 | // Required response fields: | 513 | // Required response fields: |
2193 | 514 | response->mutable_surfaceid()->CopyFrom(request->surfaceid()); | 514 | response->mutable_surfaceid()->CopyFrom(request->surfaceid()); |
2194 | 515 | 515 | ||
2195 | === modified file 'src/server/frontend/shell_wrapper.cpp' | |||
2196 | --- src/server/frontend/shell_wrapper.cpp 2016-01-29 08:18:22 +0000 | |||
2197 | +++ src/server/frontend/shell_wrapper.cpp 2017-01-10 20:52:04 +0000 | |||
2198 | @@ -85,7 +85,7 @@ | |||
2199 | 85 | int mf::ShellWrapper::set_surface_attribute( | 85 | int mf::ShellWrapper::set_surface_attribute( |
2200 | 86 | std::shared_ptr<Session> const& session, | 86 | std::shared_ptr<Session> const& session, |
2201 | 87 | SurfaceId surface_id, | 87 | SurfaceId surface_id, |
2203 | 88 | MirSurfaceAttrib attrib, | 88 | MirWindowAttrib attrib, |
2204 | 89 | int value) | 89 | int value) |
2205 | 90 | { | 90 | { |
2206 | 91 | return wrapped->set_surface_attribute(session, surface_id, attrib, value); | 91 | return wrapped->set_surface_attribute(session, surface_id, attrib, value); |
2207 | @@ -94,7 +94,7 @@ | |||
2208 | 94 | int mf::ShellWrapper::get_surface_attribute( | 94 | int mf::ShellWrapper::get_surface_attribute( |
2209 | 95 | std::shared_ptr<Session> const& session, | 95 | std::shared_ptr<Session> const& session, |
2210 | 96 | SurfaceId surface_id, | 96 | SurfaceId surface_id, |
2212 | 97 | MirSurfaceAttrib attrib) | 97 | MirWindowAttrib attrib) |
2213 | 98 | { | 98 | { |
2214 | 99 | return wrapped->get_surface_attribute(session, surface_id, attrib); | 99 | return wrapped->get_surface_attribute(session, surface_id, attrib); |
2215 | 100 | } | 100 | } |
2216 | 101 | 101 | ||
2217 | === modified file 'src/server/frontend/shell_wrapper.h' | |||
2218 | --- src/server/frontend/shell_wrapper.h 2016-01-29 08:18:22 +0000 | |||
2219 | +++ src/server/frontend/shell_wrapper.h 2017-01-10 20:52:04 +0000 | |||
2220 | @@ -67,13 +67,13 @@ | |||
2221 | 67 | int set_surface_attribute( | 67 | int set_surface_attribute( |
2222 | 68 | std::shared_ptr<Session> const& session, | 68 | std::shared_ptr<Session> const& session, |
2223 | 69 | SurfaceId surface_id, | 69 | SurfaceId surface_id, |
2225 | 70 | MirSurfaceAttrib attrib, | 70 | MirWindowAttrib attrib, |
2226 | 71 | int value) override; | 71 | int value) override; |
2227 | 72 | 72 | ||
2228 | 73 | int get_surface_attribute( | 73 | int get_surface_attribute( |
2229 | 74 | std::shared_ptr<Session> const& session, | 74 | std::shared_ptr<Session> const& session, |
2230 | 75 | SurfaceId surface_id, | 75 | SurfaceId surface_id, |
2232 | 76 | MirSurfaceAttrib attrib) override; | 76 | MirWindowAttrib attrib) override; |
2233 | 77 | 77 | ||
2234 | 78 | void raise_surface( | 78 | void raise_surface( |
2235 | 79 | std::shared_ptr<Session> const& session, | 79 | std::shared_ptr<Session> const& session, |
2236 | 80 | 80 | ||
2237 | === modified file 'src/server/input/cursor_controller.cpp' | |||
2238 | --- src/server/input/cursor_controller.cpp 2016-01-29 08:18:22 +0000 | |||
2239 | +++ src/server/input/cursor_controller.cpp 2017-01-10 20:52:04 +0000 | |||
2240 | @@ -44,7 +44,7 @@ | |||
2241 | 44 | { | 44 | { |
2242 | 45 | } | 45 | } |
2243 | 46 | 46 | ||
2245 | 47 | void attrib_changed(MirSurfaceAttrib, int) override | 47 | void attrib_changed(MirWindowAttrib, int) override |
2246 | 48 | { | 48 | { |
2247 | 49 | // Attribute changing alone wont trigger a cursor update | 49 | // Attribute changing alone wont trigger a cursor update |
2248 | 50 | } | 50 | } |
2249 | 51 | 51 | ||
2250 | === modified file 'src/server/report/logging/shell_report.cpp' | |||
2251 | --- src/server/report/logging/shell_report.cpp 2016-07-18 07:38:38 +0000 | |||
2252 | +++ src/server/report/logging/shell_report.cpp 2017-01-10 20:52:04 +0000 | |||
2253 | @@ -86,7 +86,7 @@ | |||
2254 | 86 | void mrl::ShellReport::update_surface( | 86 | void mrl::ShellReport::update_surface( |
2255 | 87 | Session const& session, | 87 | Session const& session, |
2256 | 88 | Surface const& surface, | 88 | Surface const& surface, |
2258 | 89 | MirSurfaceAttrib /*attrib*/, int /*value*/) | 89 | MirWindowAttrib /*attrib*/, int /*value*/) |
2259 | 90 | { | 90 | { |
2260 | 91 | std::ostringstream out; | 91 | std::ostringstream out; |
2261 | 92 | log_basics(out, session, surface, "update"); | 92 | log_basics(out, session, surface, "update"); |
2262 | 93 | 93 | ||
2263 | === modified file 'src/server/report/logging/shell_report.h' | |||
2264 | --- src/server/report/logging/shell_report.h 2016-07-18 07:38:38 +0000 | |||
2265 | +++ src/server/report/logging/shell_report.h 2017-01-10 20:52:04 +0000 | |||
2266 | @@ -48,7 +48,7 @@ | |||
2267 | 48 | void update_surface( | 48 | void update_surface( |
2268 | 49 | scene::Session const& session, | 49 | scene::Session const& session, |
2269 | 50 | scene::Surface const& surface, | 50 | scene::Surface const& surface, |
2271 | 51 | MirSurfaceAttrib attrib, int value) override; | 51 | MirWindowAttrib attrib, int value) override; |
2272 | 52 | 52 | ||
2273 | 53 | void destroying_surface( | 53 | void destroying_surface( |
2274 | 54 | scene::Session const& session, | 54 | scene::Session const& session, |
2275 | 55 | 55 | ||
2276 | === modified file 'src/server/report/null/shell_report.cpp' | |||
2277 | --- src/server/report/null/shell_report.cpp 2015-10-29 15:30:35 +0000 | |||
2278 | +++ src/server/report/null/shell_report.cpp 2017-01-10 20:52:04 +0000 | |||
2279 | @@ -44,7 +44,7 @@ | |||
2280 | 44 | void mrn::ShellReport::update_surface( | 44 | void mrn::ShellReport::update_surface( |
2281 | 45 | scene::Session const& /*session*/, | 45 | scene::Session const& /*session*/, |
2282 | 46 | scene::Surface const& /*surface*/, | 46 | scene::Surface const& /*surface*/, |
2284 | 47 | MirSurfaceAttrib /*attrib*/, int /*value*/) | 47 | MirWindowAttrib /*attrib*/, int /*value*/) |
2285 | 48 | { | 48 | { |
2286 | 49 | } | 49 | } |
2287 | 50 | 50 | ||
2288 | 51 | 51 | ||
2289 | === modified file 'src/server/report/null/shell_report.h' | |||
2290 | --- src/server/report/null/shell_report.h 2015-10-29 15:30:35 +0000 | |||
2291 | +++ src/server/report/null/shell_report.h 2017-01-10 20:52:04 +0000 | |||
2292 | @@ -45,7 +45,7 @@ | |||
2293 | 45 | void update_surface( | 45 | void update_surface( |
2294 | 46 | scene::Session const& /*session*/, | 46 | scene::Session const& /*session*/, |
2295 | 47 | scene::Surface const& /*surface*/, | 47 | scene::Surface const& /*surface*/, |
2297 | 48 | MirSurfaceAttrib /*attrib*/, int /*value*/) override; | 48 | MirWindowAttrib /*attrib*/, int /*value*/) override; |
2298 | 49 | 49 | ||
2299 | 50 | void destroying_surface( | 50 | void destroying_surface( |
2300 | 51 | scene::Session const& /*session*/, | 51 | scene::Session const& /*session*/, |
2301 | 52 | 52 | ||
2302 | === modified file 'src/server/scene/application_session.cpp' | |||
2303 | --- src/server/scene/application_session.cpp 2016-11-09 02:30:14 +0000 | |||
2304 | +++ src/server/scene/application_session.cpp 2017-01-10 20:52:04 +0000 | |||
2305 | @@ -140,11 +140,11 @@ | |||
2306 | 140 | surface_stack->add_surface(surface, params.input_mode); | 140 | surface_stack->add_surface(surface, params.input_mode); |
2307 | 141 | 141 | ||
2308 | 142 | if (params.state.is_set()) | 142 | if (params.state.is_set()) |
2310 | 143 | surface->configure(mir_surface_attrib_state, params.state.value()); | 143 | surface->configure(mir_window_attrib_state, params.state.value()); |
2311 | 144 | if (params.type.is_set()) | 144 | if (params.type.is_set()) |
2313 | 145 | surface->configure(mir_surface_attrib_type, params.type.value()); | 145 | surface->configure(mir_window_attrib_type, params.type.value()); |
2314 | 146 | if (params.preferred_orientation.is_set()) | 146 | if (params.preferred_orientation.is_set()) |
2316 | 147 | surface->configure(mir_surface_attrib_preferred_orientation, params.preferred_orientation.value()); | 147 | surface->configure(mir_window_attrib_preferred_orientation, params.preferred_orientation.value()); |
2317 | 148 | if (params.input_shape.is_set()) | 148 | if (params.input_shape.is_set()) |
2318 | 149 | surface->set_input_region(params.input_shape.value()); | 149 | surface->set_input_region(params.input_shape.value()); |
2319 | 150 | 150 | ||
2320 | @@ -211,17 +211,17 @@ | |||
2321 | 211 | { | 211 | { |
2322 | 212 | switch (s.second->type()) | 212 | switch (s.second->type()) |
2323 | 213 | { | 213 | { |
2331 | 214 | case mir_surface_type_normal: /**< AKA "regular" */ | 214 | case mir_window_type_normal: /**< AKA "regular" */ |
2332 | 215 | case mir_surface_type_utility: /**< AKA "floating" */ | 215 | case mir_window_type_utility: /**< AKA "floating" */ |
2333 | 216 | case mir_surface_type_dialog: | 216 | case mir_window_type_dialog: |
2334 | 217 | case mir_surface_type_satellite: /**< AKA "toolbox"/"toolbar" */ | 217 | case mir_window_type_satellite: /**< AKA "toolbox"/"toolbar" */ |
2335 | 218 | case mir_surface_type_freestyle: | 218 | case mir_window_type_freestyle: |
2336 | 219 | case mir_surface_type_menu: | 219 | case mir_window_type_menu: |
2337 | 220 | case mir_surface_type_inputmethod: /**< AKA "OSK" or handwriting etc. */ | 220 | case mir_window_type_inputmethod: /**< AKA "OSK" or handwriting etc. */ |
2338 | 221 | return true; | 221 | return true; |
2339 | 222 | 222 | ||
2342 | 223 | case mir_surface_type_gloss: | 223 | case mir_window_type_gloss: |
2343 | 224 | case mir_surface_type_tip: /**< AKA "tooltip" */ | 224 | case mir_window_type_tip: /**< AKA "tooltip" */ |
2344 | 225 | default: | 225 | default: |
2345 | 226 | // Cannot have input focus - skip it | 226 | // Cannot have input focus - skip it |
2346 | 227 | return false; | 227 | return false; |
2347 | 228 | 228 | ||
2348 | === modified file 'src/server/scene/basic_surface.cpp' | |||
2349 | --- src/server/scene/basic_surface.cpp 2016-12-09 02:54:31 +0000 | |||
2350 | +++ src/server/scene/basic_surface.cpp 2017-01-10 20:52:04 +0000 | |||
2351 | @@ -49,7 +49,7 @@ | |||
2352 | 49 | namespace geom = mir::geometry; | 49 | namespace geom = mir::geometry; |
2353 | 50 | namespace mrs = mir::renderer::software; | 50 | namespace mrs = mir::renderer::software; |
2354 | 51 | 51 | ||
2356 | 52 | void ms::SurfaceObservers::attrib_changed(MirSurfaceAttrib attrib, int value) | 52 | void ms::SurfaceObservers::attrib_changed(MirWindowAttrib attrib, int value) |
2357 | 53 | { | 53 | { |
2358 | 54 | for_each([&](std::shared_ptr<SurfaceObserver> const& observer) | 54 | for_each([&](std::shared_ptr<SurfaceObserver> const& observer) |
2359 | 55 | { observer->attrib_changed(attrib, value); }); | 55 | { observer->attrib_changed(attrib, value); }); |
2360 | @@ -457,17 +457,17 @@ | |||
2361 | 457 | observers.reception_mode_set_to(mode); | 457 | observers.reception_mode_set_to(mode); |
2362 | 458 | } | 458 | } |
2363 | 459 | 459 | ||
2365 | 460 | MirSurfaceType ms::BasicSurface::type() const | 460 | MirWindowType ms::BasicSurface::type() const |
2366 | 461 | { | 461 | { |
2367 | 462 | std::unique_lock<std::mutex> lg(guard); | 462 | std::unique_lock<std::mutex> lg(guard); |
2368 | 463 | return type_; | 463 | return type_; |
2369 | 464 | } | 464 | } |
2370 | 465 | 465 | ||
2372 | 466 | MirSurfaceType ms::BasicSurface::set_type(MirSurfaceType t) | 466 | MirWindowType ms::BasicSurface::set_type(MirWindowType t) |
2373 | 467 | { | 467 | { |
2374 | 468 | std::unique_lock<std::mutex> lg(guard); | 468 | std::unique_lock<std::mutex> lg(guard); |
2375 | 469 | 469 | ||
2377 | 470 | if (t < 0 || t > mir_surface_types) | 470 | if (t < 0 || t > mir_window_types) |
2378 | 471 | { | 471 | { |
2379 | 472 | BOOST_THROW_EXCEPTION(std::logic_error("Invalid surface " | 472 | BOOST_THROW_EXCEPTION(std::logic_error("Invalid surface " |
2380 | 473 | "type.")); | 473 | "type.")); |
2381 | @@ -478,7 +478,7 @@ | |||
2382 | 478 | type_ = t; | 478 | type_ = t; |
2383 | 479 | lg.unlock(); | 479 | lg.unlock(); |
2384 | 480 | 480 | ||
2386 | 481 | observers.attrib_changed(mir_surface_attrib_type, type_); | 481 | observers.attrib_changed(mir_window_attrib_type, type_); |
2387 | 482 | } | 482 | } |
2388 | 483 | 483 | ||
2389 | 484 | return t; | 484 | return t; |
2390 | @@ -500,7 +500,7 @@ | |||
2391 | 500 | { | 500 | { |
2392 | 501 | state_ = s; | 501 | state_ = s; |
2393 | 502 | lg.unlock(); | 502 | lg.unlock(); |
2395 | 503 | observers.attrib_changed(mir_surface_attrib_state, s); | 503 | observers.attrib_changed(mir_window_attrib_state, s); |
2396 | 504 | } | 504 | } |
2397 | 505 | 505 | ||
2398 | 506 | return s; | 506 | return s; |
2399 | @@ -522,7 +522,7 @@ | |||
2400 | 522 | info.stream->allow_framedropping(allow_dropping); | 522 | info.stream->allow_framedropping(allow_dropping); |
2401 | 523 | 523 | ||
2402 | 524 | lg.unlock(); | 524 | lg.unlock(); |
2404 | 525 | observers.attrib_changed(mir_surface_attrib_swapinterval, interval); | 525 | observers.attrib_changed(mir_window_attrib_swapinterval, interval); |
2405 | 526 | } | 526 | } |
2406 | 527 | 527 | ||
2407 | 528 | return interval; | 528 | return interval; |
2408 | @@ -542,7 +542,7 @@ | |||
2409 | 542 | focus_ = new_state; | 542 | focus_ = new_state; |
2410 | 543 | 543 | ||
2411 | 544 | lg.unlock(); | 544 | lg.unlock(); |
2413 | 545 | observers.attrib_changed(mir_surface_attrib_focus, new_state); | 545 | observers.attrib_changed(mir_window_attrib_focus, new_state); |
2414 | 546 | } | 546 | } |
2415 | 547 | 547 | ||
2416 | 548 | return new_state; | 548 | return new_state; |
2417 | @@ -561,36 +561,36 @@ | |||
2418 | 561 | pref_orientation_mode = new_orientation_mode; | 561 | pref_orientation_mode = new_orientation_mode; |
2419 | 562 | lg.unlock(); | 562 | lg.unlock(); |
2420 | 563 | 563 | ||
2422 | 564 | observers.attrib_changed(mir_surface_attrib_preferred_orientation, new_orientation_mode); | 564 | observers.attrib_changed(mir_window_attrib_preferred_orientation, new_orientation_mode); |
2423 | 565 | } | 565 | } |
2424 | 566 | 566 | ||
2425 | 567 | return new_orientation_mode; | 567 | return new_orientation_mode; |
2426 | 568 | } | 568 | } |
2427 | 569 | 569 | ||
2429 | 570 | int ms::BasicSurface::configure(MirSurfaceAttrib attrib, int value) | 570 | int ms::BasicSurface::configure(MirWindowAttrib attrib, int value) |
2430 | 571 | { | 571 | { |
2431 | 572 | int result = value; | 572 | int result = value; |
2432 | 573 | switch (attrib) | 573 | switch (attrib) |
2433 | 574 | { | 574 | { |
2436 | 575 | case mir_surface_attrib_type: | 575 | case mir_window_attrib_type: |
2437 | 576 | result = set_type(static_cast<MirSurfaceType>(result)); | 576 | result = set_type(static_cast<MirWindowType>(result)); |
2438 | 577 | break; | 577 | break; |
2440 | 578 | case mir_surface_attrib_state: | 578 | case mir_window_attrib_state: |
2441 | 579 | result = set_state(static_cast<MirSurfaceState>(result)); | 579 | result = set_state(static_cast<MirSurfaceState>(result)); |
2442 | 580 | break; | 580 | break; |
2444 | 581 | case mir_surface_attrib_focus: | 581 | case mir_window_attrib_focus: |
2445 | 582 | result = set_focus_state(static_cast<MirSurfaceFocusState>(result)); | 582 | result = set_focus_state(static_cast<MirSurfaceFocusState>(result)); |
2446 | 583 | break; | 583 | break; |
2448 | 584 | case mir_surface_attrib_swapinterval: | 584 | case mir_window_attrib_swapinterval: |
2449 | 585 | result = set_swap_interval(result); | 585 | result = set_swap_interval(result); |
2450 | 586 | break; | 586 | break; |
2452 | 587 | case mir_surface_attrib_dpi: | 587 | case mir_window_attrib_dpi: |
2453 | 588 | result = set_dpi(result); | 588 | result = set_dpi(result); |
2454 | 589 | break; | 589 | break; |
2456 | 590 | case mir_surface_attrib_visibility: | 590 | case mir_window_attrib_visibility: |
2457 | 591 | result = set_visibility(static_cast<MirSurfaceVisibility>(result)); | 591 | result = set_visibility(static_cast<MirSurfaceVisibility>(result)); |
2458 | 592 | break; | 592 | break; |
2460 | 593 | case mir_surface_attrib_preferred_orientation: | 593 | case mir_window_attrib_preferred_orientation: |
2461 | 594 | result = set_preferred_orientation(static_cast<MirOrientationMode>(result)); | 594 | result = set_preferred_orientation(static_cast<MirOrientationMode>(result)); |
2462 | 595 | break; | 595 | break; |
2463 | 596 | default: | 596 | default: |
2464 | @@ -600,18 +600,18 @@ | |||
2465 | 600 | return result; | 600 | return result; |
2466 | 601 | } | 601 | } |
2467 | 602 | 602 | ||
2469 | 603 | int ms::BasicSurface::query(MirSurfaceAttrib attrib) const | 603 | int ms::BasicSurface::query(MirWindowAttrib attrib) const |
2470 | 604 | { | 604 | { |
2471 | 605 | std::unique_lock<std::mutex> lg(guard); | 605 | std::unique_lock<std::mutex> lg(guard); |
2472 | 606 | switch (attrib) | 606 | switch (attrib) |
2473 | 607 | { | 607 | { |
2481 | 608 | case mir_surface_attrib_type: return type_; | 608 | case mir_window_attrib_type: return type_; |
2482 | 609 | case mir_surface_attrib_state: return state_; | 609 | case mir_window_attrib_state: return state_; |
2483 | 610 | case mir_surface_attrib_swapinterval: return swapinterval_; | 610 | case mir_window_attrib_swapinterval: return swapinterval_; |
2484 | 611 | case mir_surface_attrib_focus: return focus_; | 611 | case mir_window_attrib_focus: return focus_; |
2485 | 612 | case mir_surface_attrib_dpi: return dpi_; | 612 | case mir_window_attrib_dpi: return dpi_; |
2486 | 613 | case mir_surface_attrib_visibility: return visibility_; | 613 | case mir_window_attrib_visibility: return visibility_; |
2487 | 614 | case mir_surface_attrib_preferred_orientation: return pref_orientation_mode; | 614 | case mir_window_attrib_preferred_orientation: return pref_orientation_mode; |
2488 | 615 | default: BOOST_THROW_EXCEPTION(std::logic_error("Invalid surface " | 615 | default: BOOST_THROW_EXCEPTION(std::logic_error("Invalid surface " |
2489 | 616 | "attribute.")); | 616 | "attribute.")); |
2490 | 617 | } | 617 | } |
2491 | @@ -742,7 +742,7 @@ | |||
2492 | 742 | { | 742 | { |
2493 | 743 | dpi_ = new_dpi; | 743 | dpi_ = new_dpi; |
2494 | 744 | lg.unlock(); | 744 | lg.unlock(); |
2496 | 745 | observers.attrib_changed(mir_surface_attrib_dpi, new_dpi); | 745 | observers.attrib_changed(mir_window_attrib_dpi, new_dpi); |
2497 | 746 | } | 746 | } |
2498 | 747 | 747 | ||
2499 | 748 | return new_dpi; | 748 | return new_dpi; |
2500 | @@ -766,7 +766,7 @@ | |||
2501 | 766 | for (auto& info : layers) | 766 | for (auto& info : layers) |
2502 | 767 | info.stream->drop_old_buffers(); | 767 | info.stream->drop_old_buffers(); |
2503 | 768 | } | 768 | } |
2505 | 769 | observers.attrib_changed(mir_surface_attrib_visibility, visibility_); | 769 | observers.attrib_changed(mir_window_attrib_visibility, visibility_); |
2506 | 770 | } | 770 | } |
2507 | 771 | 771 | ||
2508 | 772 | return new_visibility; | 772 | return new_visibility; |
2509 | 773 | 773 | ||
2510 | === modified file 'src/server/scene/basic_surface.h' | |||
2511 | --- src/server/scene/basic_surface.h 2016-12-09 02:54:31 +0000 | |||
2512 | +++ src/server/scene/basic_surface.h 2017-01-10 20:52:04 +0000 | |||
2513 | @@ -117,10 +117,10 @@ | |||
2514 | 117 | graphics::RenderableList generate_renderables(compositor::CompositorID id) const override; | 117 | graphics::RenderableList generate_renderables(compositor::CompositorID id) const override; |
2515 | 118 | int buffers_ready_for_compositor(void const* compositor_id) const override; | 118 | int buffers_ready_for_compositor(void const* compositor_id) const override; |
2516 | 119 | 119 | ||
2518 | 120 | MirSurfaceType type() const override; | 120 | MirWindowType type() const override; |
2519 | 121 | MirSurfaceState state() const override; | 121 | MirSurfaceState state() const override; |
2522 | 122 | int configure(MirSurfaceAttrib attrib, int value) override; | 122 | int configure(MirWindowAttrib attrib, int value) override; |
2523 | 123 | int query(MirSurfaceAttrib attrib) const override; | 123 | int query(MirWindowAttrib attrib) const override; |
2524 | 124 | void hide() override; | 124 | void hide() override; |
2525 | 125 | void show() override; | 125 | void show() override; |
2526 | 126 | 126 | ||
2527 | @@ -152,7 +152,7 @@ | |||
2528 | 152 | 152 | ||
2529 | 153 | private: | 153 | private: |
2530 | 154 | bool visible(std::unique_lock<std::mutex>&) const; | 154 | bool visible(std::unique_lock<std::mutex>&) const; |
2532 | 155 | MirSurfaceType set_type(MirSurfaceType t); // Use configure() to make public changes | 155 | MirWindowType set_type(MirWindowType t); // Use configure() to make public changes |
2533 | 156 | MirSurfaceState set_state(MirSurfaceState s); | 156 | MirSurfaceState set_state(MirSurfaceState s); |
2534 | 157 | int set_dpi(int); | 157 | int set_dpi(int); |
2535 | 158 | MirSurfaceVisibility set_visibility(MirSurfaceVisibility v); | 158 | MirSurfaceVisibility set_visibility(MirSurfaceVisibility v); |
2536 | @@ -178,7 +178,7 @@ | |||
2537 | 178 | 178 | ||
2538 | 179 | std::list<StreamInfo> layers; | 179 | std::list<StreamInfo> layers; |
2539 | 180 | // Surface attributes: | 180 | // Surface attributes: |
2541 | 181 | MirSurfaceType type_ = mir_surface_type_normal; | 181 | MirWindowType type_ = mir_window_type_normal; |
2542 | 182 | MirSurfaceState state_ = mir_surface_state_restored; | 182 | MirSurfaceState state_ = mir_surface_state_restored; |
2543 | 183 | int swapinterval_ = 1; | 183 | int swapinterval_ = 1; |
2544 | 184 | MirSurfaceFocusState focus_ = mir_surface_unfocused; | 184 | MirSurfaceFocusState focus_ = mir_surface_unfocused; |
2545 | 185 | 185 | ||
2546 | === modified file 'src/server/scene/legacy_surface_change_notification.cpp' | |||
2547 | --- src/server/scene/legacy_surface_change_notification.cpp 2016-10-31 02:37:31 +0000 | |||
2548 | +++ src/server/scene/legacy_surface_change_notification.cpp 2017-01-10 20:52:04 +0000 | |||
2549 | @@ -67,7 +67,7 @@ | |||
2550 | 67 | } | 67 | } |
2551 | 68 | 68 | ||
2552 | 69 | // An attrib change alone is not enough to trigger recomposition. | 69 | // An attrib change alone is not enough to trigger recomposition. |
2554 | 70 | void ms::LegacySurfaceChangeNotification::attrib_changed(MirSurfaceAttrib /* attrib */, int /* value */) | 70 | void ms::LegacySurfaceChangeNotification::attrib_changed(MirWindowAttrib /* attrib */, int /* value */) |
2555 | 71 | { | 71 | { |
2556 | 72 | } | 72 | } |
2557 | 73 | 73 | ||
2558 | 74 | 74 | ||
2559 | === modified file 'src/server/scene/legacy_surface_change_notification.h' | |||
2560 | --- src/server/scene/legacy_surface_change_notification.h 2016-10-31 02:37:31 +0000 | |||
2561 | +++ src/server/scene/legacy_surface_change_notification.h 2017-01-10 20:52:04 +0000 | |||
2562 | @@ -41,7 +41,7 @@ | |||
2563 | 41 | void alpha_set_to(float /*alpha*/) override; | 41 | void alpha_set_to(float /*alpha*/) override; |
2564 | 42 | void orientation_set_to(MirOrientation orientation) override; | 42 | void orientation_set_to(MirOrientation orientation) override; |
2565 | 43 | void transformation_set_to(glm::mat4 const& /*t*/) override; | 43 | void transformation_set_to(glm::mat4 const& /*t*/) override; |
2567 | 44 | void attrib_changed(MirSurfaceAttrib, int) override; | 44 | void attrib_changed(MirWindowAttrib, int) override; |
2568 | 45 | void reception_mode_set_to(input::InputReceptionMode mode) override; | 45 | void reception_mode_set_to(input::InputReceptionMode mode) override; |
2569 | 46 | void cursor_image_set_to(graphics::CursorImage const& image) override; | 46 | void cursor_image_set_to(graphics::CursorImage const& image) override; |
2570 | 47 | void client_surface_close_requested() override; | 47 | void client_surface_close_requested() override; |
2571 | 48 | 48 | ||
2572 | === modified file 'src/server/scene/null_surface_observer.cpp' | |||
2573 | --- src/server/scene/null_surface_observer.cpp 2016-10-31 02:37:31 +0000 | |||
2574 | +++ src/server/scene/null_surface_observer.cpp 2017-01-10 20:52:04 +0000 | |||
2575 | @@ -21,7 +21,7 @@ | |||
2576 | 21 | namespace ms = mir::scene; | 21 | namespace ms = mir::scene; |
2577 | 22 | namespace mg = mir::graphics; | 22 | namespace mg = mir::graphics; |
2578 | 23 | 23 | ||
2580 | 24 | void ms::NullSurfaceObserver::attrib_changed(MirSurfaceAttrib /*attrib*/, int /*value*/) {} | 24 | void ms::NullSurfaceObserver::attrib_changed(MirWindowAttrib /*attrib*/, int /*value*/) {} |
2581 | 25 | void ms::NullSurfaceObserver::resized_to(geometry::Size const& /*size*/) {} | 25 | void ms::NullSurfaceObserver::resized_to(geometry::Size const& /*size*/) {} |
2582 | 26 | void ms::NullSurfaceObserver::moved_to(geometry::Point const& /*top_left*/) {} | 26 | void ms::NullSurfaceObserver::moved_to(geometry::Point const& /*top_left*/) {} |
2583 | 27 | void ms::NullSurfaceObserver::hidden_set_to(bool /*hide*/) {} | 27 | void ms::NullSurfaceObserver::hidden_set_to(bool /*hide*/) {} |
2584 | 28 | 28 | ||
2585 | === modified file 'src/server/scene/rendering_tracker.cpp' | |||
2586 | --- src/server/scene/rendering_tracker.cpp 2016-01-29 08:18:22 +0000 | |||
2587 | +++ src/server/scene/rendering_tracker.cpp 2017-01-10 20:52:04 +0000 | |||
2588 | @@ -88,7 +88,7 @@ | |||
2589 | 88 | void ms::RenderingTracker::configure_visibility(MirSurfaceVisibility visibility) | 88 | void ms::RenderingTracker::configure_visibility(MirSurfaceVisibility visibility) |
2590 | 89 | { | 89 | { |
2591 | 90 | if (auto const surface = weak_surface.lock()) | 90 | if (auto const surface = weak_surface.lock()) |
2593 | 91 | surface->configure(mir_surface_attrib_visibility, visibility); | 91 | surface->configure(mir_window_attrib_visibility, visibility); |
2594 | 92 | } | 92 | } |
2595 | 93 | 93 | ||
2596 | 94 | void ms::RenderingTracker::remove_occlusions_for_inactive_compositors() | 94 | void ms::RenderingTracker::remove_occlusions_for_inactive_compositors() |
2597 | 95 | 95 | ||
2598 | === modified file 'src/server/scene/surface_creation_parameters.cpp' | |||
2599 | --- src/server/scene/surface_creation_parameters.cpp 2016-01-29 08:18:22 +0000 | |||
2600 | +++ src/server/scene/surface_creation_parameters.cpp 2017-01-10 20:52:04 +0000 | |||
2601 | @@ -92,7 +92,7 @@ | |||
2602 | 92 | } | 92 | } |
2603 | 93 | 93 | ||
2604 | 94 | 94 | ||
2606 | 95 | ms::SurfaceCreationParameters& ms::SurfaceCreationParameters::of_type(MirSurfaceType the_type) | 95 | ms::SurfaceCreationParameters& ms::SurfaceCreationParameters::of_type(MirWindowType the_type) |
2607 | 96 | { | 96 | { |
2608 | 97 | type = the_type; | 97 | type = the_type; |
2609 | 98 | return *this; | 98 | return *this; |
2610 | 99 | 99 | ||
2611 | === modified file 'src/server/scene/surface_event_source.cpp' | |||
2612 | --- src/server/scene/surface_event_source.cpp 2016-10-31 02:37:31 +0000 | |||
2613 | +++ src/server/scene/surface_event_source.cpp 2017-01-10 20:52:04 +0000 | |||
2614 | @@ -65,7 +65,7 @@ | |||
2615 | 65 | } | 65 | } |
2616 | 66 | } | 66 | } |
2617 | 67 | 67 | ||
2619 | 68 | void ms::SurfaceEventSource::attrib_changed(MirSurfaceAttrib attrib, int value) | 68 | void ms::SurfaceEventSource::attrib_changed(MirWindowAttrib attrib, int value) |
2620 | 69 | { | 69 | { |
2621 | 70 | event_sink->handle_event(*mev::make_event(id, attrib, value)); | 70 | event_sink->handle_event(*mev::make_event(id, attrib, value)); |
2622 | 71 | } | 71 | } |
2623 | 72 | 72 | ||
2624 | === modified file 'src/server/scene/surface_stack.cpp' | |||
2625 | --- src/server/scene/surface_stack.cpp 2016-07-18 07:38:38 +0000 | |||
2626 | +++ src/server/scene/surface_stack.cpp 2017-01-10 20:52:04 +0000 | |||
2627 | @@ -309,7 +309,7 @@ | |||
2628 | 309 | RecursiveReadLock lg(guard); | 309 | RecursiveReadLock lg(guard); |
2629 | 310 | for (auto &surface : surfaces) | 310 | for (auto &surface : surfaces) |
2630 | 311 | { | 311 | { |
2632 | 312 | if (surface->query(mir_surface_attrib_visibility) == | 312 | if (surface->query(mir_window_attrib_visibility) == |
2633 | 313 | MirSurfaceVisibility::mir_surface_visibility_exposed) | 313 | MirSurfaceVisibility::mir_surface_visibility_exposed) |
2634 | 314 | { | 314 | { |
2635 | 315 | callback(surface); | 315 | callback(surface); |
2636 | 316 | 316 | ||
2637 | === modified file 'src/server/shell/abstract_shell.cpp' | |||
2638 | --- src/server/shell/abstract_shell.cpp 2016-11-09 02:30:14 +0000 | |||
2639 | +++ src/server/shell/abstract_shell.cpp 2017-01-10 20:52:04 +0000 | |||
2640 | @@ -209,7 +209,7 @@ | |||
2641 | 209 | int msh::AbstractShell::set_surface_attribute( | 209 | int msh::AbstractShell::set_surface_attribute( |
2642 | 210 | std::shared_ptr<ms::Session> const& session, | 210 | std::shared_ptr<ms::Session> const& session, |
2643 | 211 | std::shared_ptr<ms::Surface> const& surface, | 211 | std::shared_ptr<ms::Surface> const& surface, |
2645 | 212 | MirSurfaceAttrib attrib, | 212 | MirWindowAttrib attrib, |
2646 | 213 | int value) | 213 | int value) |
2647 | 214 | { | 214 | { |
2648 | 215 | report->update_surface(*session, *surface, attrib, value); | 215 | report->update_surface(*session, *surface, attrib, value); |
2649 | @@ -218,7 +218,7 @@ | |||
2650 | 218 | 218 | ||
2651 | 219 | int msh::AbstractShell::get_surface_attribute( | 219 | int msh::AbstractShell::get_surface_attribute( |
2652 | 220 | std::shared_ptr<ms::Surface> const& surface, | 220 | std::shared_ptr<ms::Surface> const& surface, |
2654 | 221 | MirSurfaceAttrib attrib) | 221 | MirWindowAttrib attrib) |
2655 | 222 | { | 222 | { |
2656 | 223 | return surface->query(attrib); | 223 | return surface->query(attrib); |
2657 | 224 | } | 224 | } |
2658 | @@ -289,7 +289,7 @@ | |||
2659 | 289 | 289 | ||
2660 | 290 | if (current_focus) | 290 | if (current_focus) |
2661 | 291 | { | 291 | { |
2663 | 292 | current_focus->configure(mir_surface_attrib_focus, mir_surface_unfocused); | 292 | current_focus->configure(mir_window_attrib_focus, mir_surface_unfocused); |
2664 | 293 | current_focus->remove_observer(focus_surface_observer); | 293 | current_focus->remove_observer(focus_surface_observer); |
2665 | 294 | } | 294 | } |
2666 | 295 | 295 | ||
2667 | @@ -303,7 +303,7 @@ | |||
2668 | 303 | // Ensure the surface has really taken the focus before notifying it that it is focused | 303 | // Ensure the surface has really taken the focus before notifying it that it is focused |
2669 | 304 | input_targeter->set_focus(surface); | 304 | input_targeter->set_focus(surface); |
2670 | 305 | surface->consume(seat->create_device_state().get()); | 305 | surface->consume(seat->create_device_state().get()); |
2672 | 306 | surface->configure(mir_surface_attrib_focus, mir_surface_focused); | 306 | surface->configure(mir_window_attrib_focus, mir_surface_focused); |
2673 | 307 | surface->add_observer(focus_surface_observer); | 307 | surface->add_observer(focus_surface_observer); |
2674 | 308 | } | 308 | } |
2675 | 309 | else | 309 | else |
2676 | 310 | 310 | ||
2677 | === modified file 'src/server/shell/basic_window_manager.cpp' | |||
2678 | --- src/server/shell/basic_window_manager.cpp 2016-02-29 15:25:14 +0000 | |||
2679 | +++ src/server/shell/basic_window_manager.cpp 2017-01-10 20:52:04 +0000 | |||
2680 | @@ -138,13 +138,13 @@ | |||
2681 | 138 | int msh::BasicWindowManager::set_surface_attribute( | 138 | int msh::BasicWindowManager::set_surface_attribute( |
2682 | 139 | std::shared_ptr<scene::Session> const& /*session*/, | 139 | std::shared_ptr<scene::Session> const& /*session*/, |
2683 | 140 | std::shared_ptr<scene::Surface> const& surface, | 140 | std::shared_ptr<scene::Surface> const& surface, |
2685 | 141 | MirSurfaceAttrib attrib, | 141 | MirWindowAttrib attrib, |
2686 | 142 | int value) | 142 | int value) |
2687 | 143 | { | 143 | { |
2688 | 144 | std::lock_guard<decltype(mutex)> lock(mutex); | 144 | std::lock_guard<decltype(mutex)> lock(mutex); |
2689 | 145 | switch (attrib) | 145 | switch (attrib) |
2690 | 146 | { | 146 | { |
2692 | 147 | case mir_surface_attrib_state: | 147 | case mir_window_attrib_state: |
2693 | 148 | { | 148 | { |
2694 | 149 | auto const state = policy->handle_set_state(surface, MirSurfaceState(value)); | 149 | auto const state = policy->handle_set_state(surface, MirSurfaceState(value)); |
2695 | 150 | return surface->configure(attrib, state); | 150 | return surface->configure(attrib, state); |
2696 | 151 | 151 | ||
2697 | === modified file 'src/server/shell/canonical_window_manager.cpp' | |||
2698 | --- src/server/shell/canonical_window_manager.cpp 2016-12-09 02:54:31 +0000 | |||
2699 | +++ src/server/shell/canonical_window_manager.cpp 2017-01-10 20:52:04 +0000 | |||
2700 | @@ -41,12 +41,12 @@ | |||
2701 | 41 | // but is currently used when placing the surface before construction. | 41 | // but is currently used when placing the surface before construction. |
2702 | 42 | // Which implies we need some rework so that we can construct metadata | 42 | // Which implies we need some rework so that we can construct metadata |
2703 | 43 | // before the surface. | 43 | // before the surface. |
2705 | 44 | bool must_not_have_parent(MirSurfaceType type) | 44 | bool must_not_have_parent(MirWindowType type) |
2706 | 45 | { | 45 | { |
2707 | 46 | switch (type) | 46 | switch (type) |
2708 | 47 | { | 47 | { |
2711 | 48 | case mir_surface_type_normal: | 48 | case mir_window_type_normal: |
2712 | 49 | case mir_surface_type_utility: | 49 | case mir_window_type_utility: |
2713 | 50 | return true; | 50 | return true; |
2714 | 51 | 51 | ||
2715 | 52 | default: | 52 | default: |
2716 | @@ -58,13 +58,13 @@ | |||
2717 | 58 | // but is currently used when placing the surface before construction. | 58 | // but is currently used when placing the surface before construction. |
2718 | 59 | // Which implies we need some rework so that we can construct metadata | 59 | // Which implies we need some rework so that we can construct metadata |
2719 | 60 | // before the surface. | 60 | // before the surface. |
2721 | 61 | bool must_have_parent(MirSurfaceType type) | 61 | bool must_have_parent(MirWindowType type) |
2722 | 62 | { | 62 | { |
2723 | 63 | switch (type) | 63 | switch (type) |
2724 | 64 | { | 64 | { |
2728 | 65 | case mir_surface_type_overlay:; | 65 | case mir_window_type_gloss:; |
2729 | 66 | case mir_surface_type_satellite: | 66 | case mir_window_type_satellite: |
2730 | 67 | case mir_surface_type_tip: | 67 | case mir_window_type_tip: |
2731 | 68 | return true; | 68 | return true; |
2732 | 69 | 69 | ||
2733 | 70 | default: | 70 | default: |
2734 | @@ -334,7 +334,7 @@ | |||
2735 | 334 | throw std::runtime_error("Target surface type requires parent"); | 334 | throw std::runtime_error("Target surface type requires parent"); |
2736 | 335 | } | 335 | } |
2737 | 336 | 336 | ||
2739 | 337 | surface->configure(mir_surface_attrib_type, new_type); | 337 | surface->configure(mir_window_attrib_type, new_type); |
2740 | 338 | } | 338 | } |
2741 | 339 | 339 | ||
2742 | 340 | #define COPY_IF_SET(field)\ | 340 | #define COPY_IF_SET(field)\ |
2743 | @@ -406,7 +406,7 @@ | |||
2744 | 406 | if (modifications.state.is_set()) | 406 | if (modifications.state.is_set()) |
2745 | 407 | { | 407 | { |
2746 | 408 | auto const state = handle_set_state(surface, modifications.state.value()); | 408 | auto const state = handle_set_state(surface, modifications.state.value()); |
2748 | 409 | surface->configure(mir_surface_attrib_state, state); | 409 | surface->configure(mir_window_attrib_state, state); |
2749 | 410 | } | 410 | } |
2750 | 411 | 411 | ||
2751 | 412 | if (modifications.confine_pointer.is_set()) | 412 | if (modifications.confine_pointer.is_set()) |
2752 | @@ -780,7 +780,7 @@ | |||
2753 | 780 | state = mir_surface_state_restored; | 780 | state = mir_surface_state_restored; |
2754 | 781 | 781 | ||
2755 | 782 | auto const value = handle_set_state(surface, MirSurfaceState(state)); | 782 | auto const value = handle_set_state(surface, MirSurfaceState(state)); |
2757 | 783 | surface->configure(mir_surface_attrib_state, value); | 783 | surface->configure(mir_window_attrib_state, value); |
2758 | 784 | } | 784 | } |
2759 | 785 | } | 785 | } |
2760 | 786 | 786 | ||
2761 | 787 | 787 | ||
2762 | === modified file 'src/server/shell/frontend_shell.cpp' | |||
2763 | --- src/server/shell/frontend_shell.cpp 2016-01-29 08:18:22 +0000 | |||
2764 | +++ src/server/shell/frontend_shell.cpp 2017-01-10 20:52:04 +0000 | |||
2765 | @@ -83,9 +83,9 @@ | |||
2766 | 83 | // in the surface spec requirements (eg: regular surface has no parent, | 83 | // in the surface spec requirements (eg: regular surface has no parent, |
2767 | 84 | // dialog may have a parent, gloss must have a parent). | 84 | // dialog may have a parent, gloss must have a parent). |
2768 | 85 | if (populated_params.parent.lock() && | 85 | if (populated_params.parent.lock() && |
2770 | 86 | populated_params.type.value() != mir_surface_type_inputmethod) | 86 | populated_params.type.value() != mir_window_type_inputmethod) |
2771 | 87 | { | 87 | { |
2773 | 88 | BOOST_THROW_EXCEPTION(std::invalid_argument("Foreign parents may only be set on surfaces of type mir_surface_type_inputmethod")); | 88 | BOOST_THROW_EXCEPTION(std::invalid_argument("Foreign parents may only be set on surfaces of type mir_window_type_inputmethod")); |
2774 | 89 | } | 89 | } |
2775 | 90 | 90 | ||
2776 | 91 | if (populated_params.parent_id.is_set()) | 91 | if (populated_params.parent_id.is_set()) |
2777 | @@ -130,7 +130,7 @@ | |||
2778 | 130 | int msh::FrontendShell::set_surface_attribute( | 130 | int msh::FrontendShell::set_surface_attribute( |
2779 | 131 | std::shared_ptr<mf::Session> const& session, | 131 | std::shared_ptr<mf::Session> const& session, |
2780 | 132 | mf::SurfaceId surface_id, | 132 | mf::SurfaceId surface_id, |
2782 | 133 | MirSurfaceAttrib attrib, | 133 | MirWindowAttrib attrib, |
2783 | 134 | int value) | 134 | int value) |
2784 | 135 | { | 135 | { |
2785 | 136 | auto const scene_session = std::dynamic_pointer_cast<ms::Session>(session); | 136 | auto const scene_session = std::dynamic_pointer_cast<ms::Session>(session); |
2786 | @@ -141,7 +141,7 @@ | |||
2787 | 141 | int msh::FrontendShell::get_surface_attribute( | 141 | int msh::FrontendShell::get_surface_attribute( |
2788 | 142 | std::shared_ptr<mf::Session> const& session, | 142 | std::shared_ptr<mf::Session> const& session, |
2789 | 143 | mf::SurfaceId surface_id, | 143 | mf::SurfaceId surface_id, |
2791 | 144 | MirSurfaceAttrib attrib) | 144 | MirWindowAttrib attrib) |
2792 | 145 | { | 145 | { |
2793 | 146 | auto const scene_session = std::dynamic_pointer_cast<ms::Session>(session); | 146 | auto const scene_session = std::dynamic_pointer_cast<ms::Session>(session); |
2794 | 147 | auto const surface = scene_session->surface(surface_id); | 147 | auto const surface = scene_session->surface(surface_id); |
2795 | 148 | 148 | ||
2796 | === modified file 'src/server/shell/frontend_shell.h' | |||
2797 | --- src/server/shell/frontend_shell.h 2016-01-29 08:18:22 +0000 | |||
2798 | +++ src/server/shell/frontend_shell.h 2017-01-10 20:52:04 +0000 | |||
2799 | @@ -79,13 +79,13 @@ | |||
2800 | 79 | int set_surface_attribute( | 79 | int set_surface_attribute( |
2801 | 80 | std::shared_ptr<mf::Session> const& session, | 80 | std::shared_ptr<mf::Session> const& session, |
2802 | 81 | mf::SurfaceId surface_id, | 81 | mf::SurfaceId surface_id, |
2804 | 82 | MirSurfaceAttrib attrib, | 82 | MirWindowAttrib attrib, |
2805 | 83 | int value) override; | 83 | int value) override; |
2806 | 84 | 84 | ||
2807 | 85 | int get_surface_attribute( | 85 | int get_surface_attribute( |
2808 | 86 | std::shared_ptr<mf::Session> const& session, | 86 | std::shared_ptr<mf::Session> const& session, |
2809 | 87 | mf::SurfaceId surface_id, | 87 | mf::SurfaceId surface_id, |
2811 | 88 | MirSurfaceAttrib attrib) override; | 88 | MirWindowAttrib attrib) override; |
2812 | 89 | 89 | ||
2813 | 90 | void raise_surface( | 90 | void raise_surface( |
2814 | 91 | std::shared_ptr<mf::Session> const& session, | 91 | std::shared_ptr<mf::Session> const& session, |
2815 | 92 | 92 | ||
2816 | === modified file 'src/server/shell/shell_wrapper.cpp' | |||
2817 | --- src/server/shell/shell_wrapper.cpp 2016-01-29 08:18:22 +0000 | |||
2818 | +++ src/server/shell/shell_wrapper.cpp 2017-01-10 20:52:04 +0000 | |||
2819 | @@ -99,7 +99,7 @@ | |||
2820 | 99 | int msh::ShellWrapper::set_surface_attribute( | 99 | int msh::ShellWrapper::set_surface_attribute( |
2821 | 100 | std::shared_ptr<ms::Session> const& session, | 100 | std::shared_ptr<ms::Session> const& session, |
2822 | 101 | std::shared_ptr<ms::Surface> const& surface, | 101 | std::shared_ptr<ms::Surface> const& surface, |
2824 | 102 | MirSurfaceAttrib attrib, | 102 | MirWindowAttrib attrib, |
2825 | 103 | int value) | 103 | int value) |
2826 | 104 | { | 104 | { |
2827 | 105 | return wrapped->set_surface_attribute(session, surface, attrib, value); | 105 | return wrapped->set_surface_attribute(session, surface, attrib, value); |
2828 | @@ -107,7 +107,7 @@ | |||
2829 | 107 | 107 | ||
2830 | 108 | int msh::ShellWrapper::get_surface_attribute( | 108 | int msh::ShellWrapper::get_surface_attribute( |
2831 | 109 | std::shared_ptr<ms::Surface> const& surface, | 109 | std::shared_ptr<ms::Surface> const& surface, |
2833 | 110 | MirSurfaceAttrib attrib) | 110 | MirWindowAttrib attrib) |
2834 | 111 | { | 111 | { |
2835 | 112 | return wrapped->get_surface_attribute(surface, attrib); | 112 | return wrapped->get_surface_attribute(surface, attrib); |
2836 | 113 | } | 113 | } |
2837 | 114 | 114 | ||
2838 | === modified file 'src/server/shell/system_compositor_window_manager.cpp' | |||
2839 | --- src/server/shell/system_compositor_window_manager.cpp 2016-07-18 07:38:38 +0000 | |||
2840 | +++ src/server/shell/system_compositor_window_manager.cpp 2017-01-10 20:52:04 +0000 | |||
2841 | @@ -168,7 +168,7 @@ | |||
2842 | 168 | int msh::SystemCompositorWindowManager::set_surface_attribute( | 168 | int msh::SystemCompositorWindowManager::set_surface_attribute( |
2843 | 169 | std::shared_ptr<ms::Session> const& /*session*/, | 169 | std::shared_ptr<ms::Session> const& /*session*/, |
2844 | 170 | std::shared_ptr<ms::Surface> const& surface, | 170 | std::shared_ptr<ms::Surface> const& surface, |
2846 | 171 | MirSurfaceAttrib attrib, | 171 | MirWindowAttrib attrib, |
2847 | 172 | int value) | 172 | int value) |
2848 | 173 | { | 173 | { |
2849 | 174 | return surface->configure(attrib, value); | 174 | return surface->configure(attrib, value); |
2850 | 175 | 175 | ||
2851 | === modified file 'src/server/shell/window_management_info.cpp' | |||
2852 | --- src/server/shell/window_management_info.cpp 2016-02-29 15:25:14 +0000 | |||
2853 | +++ src/server/shell/window_management_info.cpp 2017-01-10 20:52:04 +0000 | |||
2854 | @@ -56,17 +56,17 @@ | |||
2855 | 56 | { | 56 | { |
2856 | 57 | switch (type) | 57 | switch (type) |
2857 | 58 | { | 58 | { |
2865 | 59 | case mir_surface_type_normal: /**< AKA "regular" */ | 59 | case mir_window_type_normal: /**< AKA "regular" */ |
2866 | 60 | case mir_surface_type_utility: /**< AKA "floating" */ | 60 | case mir_window_type_utility: /**< AKA "floating" */ |
2867 | 61 | case mir_surface_type_dialog: | 61 | case mir_window_type_dialog: |
2868 | 62 | case mir_surface_type_satellite: /**< AKA "toolbox"/"toolbar" */ | 62 | case mir_window_type_satellite: /**< AKA "toolbox"/"toolbar" */ |
2869 | 63 | case mir_surface_type_freestyle: | 63 | case mir_window_type_freestyle: |
2870 | 64 | case mir_surface_type_menu: | 64 | case mir_window_type_menu: |
2871 | 65 | case mir_surface_type_inputmethod: /**< AKA "OSK" or handwriting etc. */ | 65 | case mir_window_type_inputmethod: /**< AKA "OSK" or handwriting etc. */ |
2872 | 66 | return true; | 66 | return true; |
2873 | 67 | 67 | ||
2876 | 68 | case mir_surface_type_gloss: | 68 | case mir_window_type_gloss: |
2877 | 69 | case mir_surface_type_tip: /**< AKA "tooltip" */ | 69 | case mir_window_type_tip: /**< AKA "tooltip" */ |
2878 | 70 | default: | 70 | default: |
2879 | 71 | // Cannot have input focus | 71 | // Cannot have input focus |
2880 | 72 | return false; | 72 | return false; |
2881 | @@ -77,10 +77,10 @@ | |||
2882 | 77 | { | 77 | { |
2883 | 78 | switch (type) | 78 | switch (type) |
2884 | 79 | { | 79 | { |
2889 | 80 | case mir_surface_type_overlay:; | 80 | case mir_window_type_gloss:; |
2890 | 81 | case mir_surface_type_inputmethod: | 81 | case mir_window_type_inputmethod: |
2891 | 82 | case mir_surface_type_satellite: | 82 | case mir_window_type_satellite: |
2892 | 83 | case mir_surface_type_tip: | 83 | case mir_window_type_tip: |
2893 | 84 | return true; | 84 | return true; |
2894 | 85 | 85 | ||
2895 | 86 | default: | 86 | default: |
2896 | @@ -88,19 +88,19 @@ | |||
2897 | 88 | } | 88 | } |
2898 | 89 | } | 89 | } |
2899 | 90 | 90 | ||
2901 | 91 | bool msh::SurfaceInfo::can_morph_to(MirSurfaceType new_type) const | 91 | bool msh::SurfaceInfo::can_morph_to(MirWindowType new_type) const |
2902 | 92 | { | 92 | { |
2903 | 93 | switch (new_type) | 93 | switch (new_type) |
2904 | 94 | { | 94 | { |
2908 | 95 | case mir_surface_type_normal: | 95 | case mir_window_type_normal: |
2909 | 96 | case mir_surface_type_utility: | 96 | case mir_window_type_utility: |
2910 | 97 | case mir_surface_type_satellite: | 97 | case mir_window_type_satellite: |
2911 | 98 | switch (type) | 98 | switch (type) |
2912 | 99 | { | 99 | { |
2917 | 100 | case mir_surface_type_normal: | 100 | case mir_window_type_normal: |
2918 | 101 | case mir_surface_type_utility: | 101 | case mir_window_type_utility: |
2919 | 102 | case mir_surface_type_dialog: | 102 | case mir_window_type_dialog: |
2920 | 103 | case mir_surface_type_satellite: | 103 | case mir_window_type_satellite: |
2921 | 104 | return true; | 104 | return true; |
2922 | 105 | 105 | ||
2923 | 106 | default: | 106 | default: |
2924 | @@ -108,14 +108,14 @@ | |||
2925 | 108 | } | 108 | } |
2926 | 109 | break; | 109 | break; |
2927 | 110 | 110 | ||
2929 | 111 | case mir_surface_type_dialog: | 111 | case mir_window_type_dialog: |
2930 | 112 | switch (type) | 112 | switch (type) |
2931 | 113 | { | 113 | { |
2937 | 114 | case mir_surface_type_normal: | 114 | case mir_window_type_normal: |
2938 | 115 | case mir_surface_type_utility: | 115 | case mir_window_type_utility: |
2939 | 116 | case mir_surface_type_dialog: | 116 | case mir_window_type_dialog: |
2940 | 117 | case mir_surface_type_popover: | 117 | case mir_window_type_popover: |
2941 | 118 | case mir_surface_type_satellite: | 118 | case mir_window_type_satellite: |
2942 | 119 | return true; | 119 | return true; |
2943 | 120 | 120 | ||
2944 | 121 | default: | 121 | default: |
2945 | @@ -134,8 +134,8 @@ | |||
2946 | 134 | { | 134 | { |
2947 | 135 | switch (type) | 135 | switch (type) |
2948 | 136 | { | 136 | { |
2951 | 137 | case mir_surface_type_normal: | 137 | case mir_window_type_normal: |
2952 | 138 | case mir_surface_type_utility: | 138 | case mir_window_type_utility: |
2953 | 139 | return true; | 139 | return true; |
2954 | 140 | 140 | ||
2955 | 141 | default: | 141 | default: |
2956 | @@ -284,15 +284,15 @@ | |||
2957 | 284 | requested_size = new_size; | 284 | requested_size = new_size; |
2958 | 285 | } | 285 | } |
2959 | 286 | 286 | ||
2961 | 287 | bool msh::SurfaceInfo::needs_titlebar(MirSurfaceType type) | 287 | bool msh::SurfaceInfo::needs_titlebar(MirWindowType type) |
2962 | 288 | { | 288 | { |
2963 | 289 | switch (type) | 289 | switch (type) |
2964 | 290 | { | 290 | { |
2970 | 291 | case mir_surface_type_freestyle: | 291 | case mir_window_type_freestyle: |
2971 | 292 | case mir_surface_type_menu: | 292 | case mir_window_type_menu: |
2972 | 293 | case mir_surface_type_inputmethod: | 293 | case mir_window_type_inputmethod: |
2973 | 294 | case mir_surface_type_gloss: | 294 | case mir_window_type_gloss: |
2974 | 295 | case mir_surface_type_tip: | 295 | case mir_window_type_tip: |
2975 | 296 | // No decorations for these surface types | 296 | // No decorations for these surface types |
2976 | 297 | return false; | 297 | return false; |
2977 | 298 | default: | 298 | default: |
2978 | 299 | 299 | ||
2979 | === modified file 'src/utils/vanity.c' | |||
2980 | --- src/utils/vanity.c 2017-01-09 06:48:47 +0000 | |||
2981 | +++ src/utils/vanity.c 2017-01-10 20:52:04 +0000 | |||
2982 | @@ -135,12 +135,12 @@ | |||
2983 | 135 | return false; | 135 | return false; |
2984 | 136 | } | 136 | } |
2985 | 137 | 137 | ||
2987 | 138 | static bool on_surface_event(MirSurfaceEvent const* sevent, State* state) | 138 | static bool on_surface_event(MirWindowEvent const* wevent, State* state) |
2988 | 139 | { | 139 | { |
2991 | 140 | MirSurfaceAttrib attrib = mir_surface_event_get_attribute(sevent); | 140 | MirWindowAttrib attrib = mir_window_event_get_attribute(wevent); |
2992 | 141 | int value = mir_surface_event_get_attribute_value(sevent); | 141 | int value = mir_window_event_get_attribute_value(wevent); |
2993 | 142 | 142 | ||
2995 | 143 | if (attrib == mir_surface_attrib_visibility) | 143 | if (attrib == mir_window_attrib_visibility) |
2996 | 144 | { | 144 | { |
2997 | 145 | if (value == mir_surface_visibility_exposed) | 145 | if (value == mir_surface_visibility_exposed) |
2998 | 146 | { | 146 | { |
2999 | @@ -172,8 +172,8 @@ | |||
3000 | 172 | case mir_event_type_input: | 172 | case mir_event_type_input: |
3001 | 173 | handled = on_input_event(mir_event_get_input_event(event), state); | 173 | handled = on_input_event(mir_event_get_input_event(event), state); |
3002 | 174 | break; | 174 | break; |
3005 | 175 | case mir_event_type_surface: | 175 | case mir_event_type_window: |
3006 | 176 | handled = on_surface_event(mir_event_get_surface_event(event), state); | 176 | handled = on_surface_event(mir_event_get_window_event(event), state); |
3007 | 177 | break; | 177 | break; |
3008 | 178 | case mir_event_type_resize: | 178 | case mir_event_type_resize: |
3009 | 179 | state->resized = true; | 179 | state->resized = true; |
3010 | 180 | 180 | ||
3011 | === modified file 'tests/acceptance-tests/test_client_cookie.cpp' | |||
3012 | --- tests/acceptance-tests/test_client_cookie.cpp 2017-01-09 06:48:47 +0000 | |||
3013 | +++ tests/acceptance-tests/test_client_cookie.cpp 2017-01-10 20:52:04 +0000 | |||
3014 | @@ -101,20 +101,20 @@ | |||
3015 | 101 | auto const event_type = mir_event_get_type(ev); | 101 | auto const event_type = mir_event_get_type(ev); |
3016 | 102 | auto client_cookie = static_cast<ClientCookies*>(ctx); | 102 | auto client_cookie = static_cast<ClientCookies*>(ctx); |
3017 | 103 | 103 | ||
3019 | 104 | if (event_type == mir_event_type_surface) | 104 | if (event_type == mir_event_type_window) |
3020 | 105 | { | 105 | { |
3024 | 106 | auto event = mir_event_get_surface_event(ev); | 106 | auto event = mir_event_get_window_event(ev); |
3025 | 107 | auto const attrib = mir_surface_event_get_attribute(event); | 107 | auto const attrib = mir_window_event_get_attribute(event); |
3026 | 108 | auto const value = mir_surface_event_get_attribute_value(event); | 108 | auto const value = mir_window_event_get_attribute_value(event); |
3027 | 109 | 109 | ||
3028 | 110 | std::lock_guard<std::mutex> lk(client_cookie->mutex); | 110 | std::lock_guard<std::mutex> lk(client_cookie->mutex); |
3030 | 111 | if (attrib == mir_surface_attrib_visibility && | 111 | if (attrib == mir_window_attrib_visibility && |
3031 | 112 | value == mir_surface_visibility_exposed) | 112 | value == mir_surface_visibility_exposed) |
3032 | 113 | { | 113 | { |
3033 | 114 | client_cookie->exposed = true; | 114 | client_cookie->exposed = true; |
3034 | 115 | } | 115 | } |
3035 | 116 | 116 | ||
3037 | 117 | if (attrib == mir_surface_attrib_focus && | 117 | if (attrib == mir_window_attrib_focus && |
3038 | 118 | value == mir_surface_focused) | 118 | value == mir_surface_focused) |
3039 | 119 | { | 119 | { |
3040 | 120 | client_cookie->focused = true; | 120 | client_cookie->focused = true; |
3041 | 121 | 121 | ||
3042 | === modified file 'tests/acceptance-tests/test_client_focus_notification.cpp' | |||
3043 | --- tests/acceptance-tests/test_client_focus_notification.cpp 2017-01-09 06:48:47 +0000 | |||
3044 | +++ tests/acceptance-tests/test_client_focus_notification.cpp 2017-01-10 20:52:04 +0000 | |||
3045 | @@ -57,14 +57,15 @@ | |||
3046 | 57 | 57 | ||
3047 | 58 | static void handle_event(MirWindow* window, MirEvent const* ev, void* context) | 58 | static void handle_event(MirWindow* window, MirEvent const* ev, void* context) |
3048 | 59 | { | 59 | { |
3050 | 60 | if (mir_event_type_surface == mir_event_get_type(ev)) | 60 | if (mir_event_type_window == mir_event_get_type(ev)) |
3051 | 61 | { | 61 | { |
3054 | 62 | auto surface_ev = mir_event_get_surface_event(ev); | 62 | auto surface_ev = mir_event_get_window_event(ev); |
3055 | 63 | if (mir_surface_attrib_focus == mir_surface_event_get_attribute(surface_ev)) | 63 | auto attrib = mir_window_event_get_attribute(surface_ev); |
3056 | 64 | if (mir_window_attrib_focus == attrib) | ||
3057 | 64 | { | 65 | { |
3058 | 65 | auto self = static_cast<FocusSurface*>(context); | 66 | auto self = static_cast<FocusSurface*>(context); |
3059 | 66 | self->log_focus_event(window, | 67 | self->log_focus_event(window, |
3061 | 67 | static_cast<MirSurfaceFocusState>(mir_surface_event_get_attribute_value(surface_ev))); | 68 | static_cast<MirSurfaceFocusState>(mir_window_event_get_attribute_value(surface_ev))); |
3062 | 68 | } | 69 | } |
3063 | 69 | } | 70 | } |
3064 | 70 | } | 71 | } |
3065 | 71 | 72 | ||
3066 | === modified file 'tests/acceptance-tests/test_client_input.cpp' | |||
3067 | --- tests/acceptance-tests/test_client_input.cpp 2017-01-09 06:48:47 +0000 | |||
3068 | +++ tests/acceptance-tests/test_client_input.cpp 2017-01-10 20:52:04 +0000 | |||
3069 | @@ -112,16 +112,16 @@ | |||
3070 | 112 | BOOST_THROW_EXCEPTION(std::runtime_error("Timeout waiting for window to become focused and exposed")); | 112 | BOOST_THROW_EXCEPTION(std::runtime_error("Timeout waiting for window to become focused and exposed")); |
3071 | 113 | } | 113 | } |
3072 | 114 | 114 | ||
3074 | 115 | void handle_surface_event(MirSurfaceEvent const* event) | 115 | void handle_window_event(MirWindowEvent const* event) |
3075 | 116 | { | 116 | { |
3078 | 117 | auto const attrib = mir_surface_event_get_attribute(event); | 117 | auto const attrib = mir_window_event_get_attribute(event); |
3079 | 118 | auto const value = mir_surface_event_get_attribute_value(event); | 118 | auto const value = mir_window_event_get_attribute_value(event); |
3080 | 119 | 119 | ||
3082 | 120 | if (mir_surface_attrib_visibility == attrib && | 120 | if (mir_window_attrib_visibility == attrib && |
3083 | 121 | mir_surface_visibility_exposed == value) | 121 | mir_surface_visibility_exposed == value) |
3084 | 122 | exposed = true; | 122 | exposed = true; |
3085 | 123 | 123 | ||
3087 | 124 | if (mir_surface_attrib_focus == attrib && | 124 | if (mir_window_attrib_focus == attrib && |
3088 | 125 | mir_surface_focused == value) | 125 | mir_surface_focused == value) |
3089 | 126 | focused = true; | 126 | focused = true; |
3090 | 127 | 127 | ||
3091 | @@ -133,10 +133,10 @@ | |||
3092 | 133 | { | 133 | { |
3093 | 134 | auto const client = static_cast<Client*>(context); | 134 | auto const client = static_cast<Client*>(context); |
3094 | 135 | auto type = mir_event_get_type(ev); | 135 | auto type = mir_event_get_type(ev); |
3096 | 136 | if (type == mir_event_type_surface) | 136 | if (type == mir_event_type_window) |
3097 | 137 | { | 137 | { |
3100 | 138 | auto surface_event = mir_event_get_surface_event(ev); | 138 | auto window_event = mir_event_get_window_event(ev); |
3101 | 139 | client->handle_surface_event(surface_event); | 139 | client->handle_window_event(window_event); |
3102 | 140 | 140 | ||
3103 | 141 | } | 141 | } |
3104 | 142 | if (type == mir_event_type_input) | 142 | if (type == mir_event_type_input) |
3105 | 143 | 143 | ||
3106 | === modified file 'tests/acceptance-tests/test_client_library.cpp' | |||
3107 | --- tests/acceptance-tests/test_client_library.cpp 2017-01-09 07:03:12 +0000 | |||
3108 | +++ tests/acceptance-tests/test_client_library.cpp 2017-01-10 20:52:04 +0000 | |||
3109 | @@ -767,7 +767,7 @@ | |||
3110 | 767 | 767 | ||
3111 | 768 | EXPECT_THAT(native_buffer->width, Eq(width)); | 768 | EXPECT_THAT(native_buffer->width, Eq(width)); |
3112 | 769 | EXPECT_THAT(native_buffer->height, Eq(height)); | 769 | EXPECT_THAT(native_buffer->height, Eq(height)); |
3114 | 770 | EXPECT_THAT(mir_surface_get_type(window), Eq(mir_surface_type_normal)); | 770 | EXPECT_THAT(mir_window_get_type(window), Eq(mir_window_type_normal)); |
3115 | 771 | 771 | ||
3116 | 772 | mir_window_release_sync(window); | 772 | mir_window_release_sync(window); |
3117 | 773 | mir_connection_release(connection); | 773 | mir_connection_release(connection); |
3118 | @@ -793,7 +793,7 @@ | |||
3119 | 793 | 793 | ||
3120 | 794 | EXPECT_THAT(native_buffer->width, Eq(width)); | 794 | EXPECT_THAT(native_buffer->width, Eq(width)); |
3121 | 795 | EXPECT_THAT(native_buffer->height, Eq(height)); | 795 | EXPECT_THAT(native_buffer->height, Eq(height)); |
3123 | 796 | EXPECT_THAT(mir_surface_get_type(window), Eq(mir_surface_type_normal)); | 796 | EXPECT_THAT(mir_window_get_type(window), Eq(mir_window_type_normal)); |
3124 | 797 | 797 | ||
3125 | 798 | mir_window_release_sync(window); | 798 | mir_window_release_sync(window); |
3126 | 799 | mir_connection_release(connection); | 799 | mir_connection_release(connection); |
3127 | 800 | 800 | ||
3128 | === modified file 'tests/acceptance-tests/test_client_surface_events.cpp' | |||
3129 | --- tests/acceptance-tests/test_client_surface_events.cpp 2017-01-09 06:48:47 +0000 | |||
3130 | +++ tests/acceptance-tests/test_client_surface_events.cpp 2017-01-10 20:52:04 +0000 | |||
3131 | @@ -51,12 +51,56 @@ | |||
3132 | 51 | 51 | ||
3133 | 52 | namespace | 52 | namespace |
3134 | 53 | { | 53 | { |
3135 | 54 | // Assert our MirSurfaceAttrib is 1to1 to MirWindowAttrib | ||
3136 | 55 | static_assert( | ||
3137 | 56 | static_cast<int32_t>(mir_surface_attrib_type) == | ||
3138 | 57 | static_cast<int32_t>(mir_window_attrib_type), | ||
3139 | 58 | "mir_surface_attrib_type != mir_window_attrib_type"); | ||
3140 | 59 | |||
3141 | 60 | static_assert( | ||
3142 | 61 | static_cast<int32_t>(mir_surface_attrib_state) == | ||
3143 | 62 | static_cast<int32_t>(mir_window_attrib_state), | ||
3144 | 63 | "mir_surface_attrib_state != mir_window_attrib_state"); | ||
3145 | 64 | |||
3146 | 65 | static_assert( | ||
3147 | 66 | static_cast<int32_t>(mir_surface_attrib_swapinterval) == | ||
3148 | 67 | static_cast<int32_t>(mir_window_attrib_swapinterval), | ||
3149 | 68 | "mir_surface_attrib_swapinterval != mir_window_attrib_swapinterval"); | ||
3150 | 69 | |||
3151 | 70 | static_assert( | ||
3152 | 71 | static_cast<int32_t>(mir_surface_attrib_focus) == | ||
3153 | 72 | static_cast<int32_t>(mir_window_attrib_focus), | ||
3154 | 73 | "mir_surface_attrib_focus != mir_window_attrib_focus"); | ||
3155 | 74 | |||
3156 | 75 | static_assert( | ||
3157 | 76 | static_cast<int32_t>(mir_surface_attrib_dpi) == | ||
3158 | 77 | static_cast<int32_t>(mir_window_attrib_dpi), | ||
3159 | 78 | "mir_surface_attrib_dpi != mir_window_attrib_dpi"); | ||
3160 | 79 | |||
3161 | 80 | static_assert( | ||
3162 | 81 | static_cast<int32_t>(mir_surface_attrib_visibility) == | ||
3163 | 82 | static_cast<int32_t>(mir_window_attrib_visibility), | ||
3164 | 83 | "mir_surface_attrib_visibility != mir_window_attrib_visibility"); | ||
3165 | 84 | |||
3166 | 85 | static_assert( | ||
3167 | 86 | static_cast<int32_t>(mir_surface_attrib_preferred_orientation) == | ||
3168 | 87 | static_cast<int32_t>(mir_window_attrib_preferred_orientation), | ||
3169 | 88 | "mir_surface_attrib_preferred_orientation != mir_window_attrib_preferred_orientation"); | ||
3170 | 89 | |||
3171 | 90 | static_assert( | ||
3172 | 91 | static_cast<int32_t>(mir_surface_attribs) == | ||
3173 | 92 | static_cast<int32_t>(mir_window_attribs), | ||
3174 | 93 | "mir_surface_attribs != mir_window_attribs"); | ||
3175 | 94 | |||
3176 | 95 | static_assert(sizeof(MirSurfaceAttrib) == sizeof(MirWindowAttrib), | ||
3177 | 96 | "sizeof(MirSurfaceAttrib) != sizeof(MirWindowAttrib)"); | ||
3178 | 97 | |||
3179 | 54 | struct ClientSurfaceEvents : mtf::ConnectedClientWithASurface | 98 | struct ClientSurfaceEvents : mtf::ConnectedClientWithASurface |
3180 | 55 | { | 99 | { |
3181 | 56 | MirSurface* other_surface; | 100 | MirSurface* other_surface; |
3182 | 57 | 101 | ||
3183 | 58 | std::mutex last_event_mutex; | 102 | std::mutex last_event_mutex; |
3185 | 59 | MirEventType event_filter{mir_event_type_surface}; | 103 | MirEventType event_filter{mir_event_type_window}; |
3186 | 60 | std::condition_variable last_event_cv; | 104 | std::condition_variable last_event_cv; |
3187 | 61 | MirEvent const* last_event = nullptr; | 105 | MirEvent const* last_event = nullptr; |
3188 | 62 | MirSurface* last_event_surface = nullptr; | 106 | MirSurface* last_event_surface = nullptr; |
3189 | @@ -158,14 +202,14 @@ | |||
3190 | 158 | 202 | ||
3191 | 159 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; | 203 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; |
3192 | 160 | 204 | ||
3194 | 161 | EXPECT_THAT(last_event, mt::SurfaceEvent(mir_surface_attrib_state, mir_surface_state_fullscreen)); | 205 | EXPECT_THAT(last_event, mt::WindowEvent(mir_window_attrib_state, mir_surface_state_fullscreen)); |
3195 | 162 | } | 206 | } |
3196 | 163 | 207 | ||
3197 | 164 | { | 208 | { |
3198 | 165 | mir_wait_for(mir_surface_set_state(window, static_cast<MirSurfaceState>(999))); | 209 | mir_wait_for(mir_surface_set_state(window, static_cast<MirSurfaceState>(999))); |
3199 | 166 | 210 | ||
3200 | 167 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; | 211 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; |
3202 | 168 | EXPECT_THAT(last_event, mt::SurfaceEvent(mir_surface_attrib_state, mir_surface_state_fullscreen)); | 212 | EXPECT_THAT(last_event, mt::WindowEvent(mir_window_attrib_state, mir_surface_state_fullscreen)); |
3203 | 169 | } | 213 | } |
3204 | 170 | 214 | ||
3205 | 171 | reset_last_event(); | 215 | reset_last_event(); |
3206 | @@ -175,7 +219,7 @@ | |||
3207 | 175 | 219 | ||
3208 | 176 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; | 220 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; |
3209 | 177 | 221 | ||
3211 | 178 | EXPECT_THAT(last_event, mt::SurfaceEvent(mir_surface_attrib_state, mir_surface_state_vertmaximized)); | 222 | EXPECT_THAT(last_event, mt::WindowEvent(mir_window_attrib_state, mir_surface_state_vertmaximized)); |
3212 | 179 | } | 223 | } |
3213 | 180 | 224 | ||
3214 | 181 | reset_last_event(); | 225 | reset_last_event(); |
3215 | @@ -232,7 +276,7 @@ | |||
3216 | 232 | 276 | ||
3217 | 233 | TEST_F(ClientSurfaceEvents, surface_receives_close_event) | 277 | TEST_F(ClientSurfaceEvents, surface_receives_close_event) |
3218 | 234 | { | 278 | { |
3220 | 235 | set_event_filter(mir_event_type_close_surface); | 279 | set_event_filter(mir_event_type_close_window); |
3221 | 236 | 280 | ||
3222 | 237 | scene_surface->request_client_surface_close(); | 281 | scene_surface->request_client_surface_close(); |
3223 | 238 | 282 | ||
3224 | @@ -241,7 +285,7 @@ | |||
3225 | 241 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; | 285 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; |
3226 | 242 | 286 | ||
3227 | 243 | EXPECT_THAT(last_event_surface, Eq(window)); | 287 | EXPECT_THAT(last_event_surface, Eq(window)); |
3229 | 244 | EXPECT_THAT(mir_event_get_type(last_event), Eq(mir_event_type_close_surface)); | 288 | EXPECT_THAT(mir_event_get_type(last_event), Eq(mir_event_type_close_window)); |
3230 | 245 | } | 289 | } |
3231 | 246 | 290 | ||
3232 | 247 | TEST_F(ClientSurfaceEvents, client_can_query_preferred_orientation) | 291 | TEST_F(ClientSurfaceEvents, client_can_query_preferred_orientation) |
3233 | @@ -281,7 +325,7 @@ | |||
3234 | 281 | 325 | ||
3235 | 282 | ASSERT_FALSE(current_mode.empty()); | 326 | ASSERT_FALSE(current_mode.empty()); |
3236 | 283 | 327 | ||
3238 | 284 | set_event_filter(mir_event_type_surface_output); | 328 | set_event_filter(mir_event_type_window_output); |
3239 | 285 | reset_last_event(); | 329 | reset_last_event(); |
3240 | 286 | 330 | ||
3241 | 287 | auto display_controller = server.the_display_configuration_controller(); | 331 | auto display_controller = server.the_display_configuration_controller(); |
3242 | @@ -291,20 +335,20 @@ | |||
3243 | 291 | 335 | ||
3244 | 292 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; | 336 | std::lock_guard<decltype(last_event_mutex)> last_event_lock{last_event_mutex}; |
3245 | 293 | 337 | ||
3253 | 294 | EXPECT_THAT(mir_event_get_type(last_event), Eq(mir_event_type_surface_output)); | 338 | EXPECT_THAT(mir_event_get_type(last_event), Eq(mir_event_type_window_output)); |
3254 | 295 | auto output_event = mir_event_get_surface_output_event(last_event); | 339 | auto output_event = mir_event_get_window_output_event(last_event); |
3255 | 296 | 340 | ||
3256 | 297 | EXPECT_THAT(mir_surface_output_event_get_form_factor(output_event), Eq(form_factor)); | 341 | EXPECT_THAT(mir_window_output_event_get_form_factor(output_event), Eq(form_factor)); |
3257 | 298 | EXPECT_THAT(mir_surface_output_event_get_scale(output_event), FloatEq(scale)); | 342 | EXPECT_THAT(mir_window_output_event_get_scale(output_event), FloatEq(scale)); |
3258 | 299 | 343 | ||
3259 | 300 | auto id = mir_surface_output_event_get_output_id(output_event); | 344 | auto id = mir_window_output_event_get_output_id(output_event); |
3260 | 301 | ASSERT_THAT(current_mode.find(id), Ne(current_mode.end())); | 345 | ASSERT_THAT(current_mode.find(id), Ne(current_mode.end())); |
3262 | 302 | EXPECT_THAT(mir_surface_output_event_get_refresh_rate(output_event), Eq(current_mode[id].vrefresh_hz)); | 346 | EXPECT_THAT(mir_window_output_event_get_refresh_rate(output_event), Eq(current_mode[id].vrefresh_hz)); |
3263 | 303 | } | 347 | } |
3264 | 304 | 348 | ||
3265 | 305 | TEST_F(ClientSurfaceEvents, can_unset_surface_event_handler) | 349 | TEST_F(ClientSurfaceEvents, can_unset_surface_event_handler) |
3266 | 306 | { | 350 | { |
3268 | 307 | set_event_filter(mir_event_type_close_surface); | 351 | set_event_filter(mir_event_type_close_window); |
3269 | 308 | 352 | ||
3270 | 309 | mir_window_set_event_handler(window, nullptr, nullptr); | 353 | mir_window_set_event_handler(window, nullptr, nullptr); |
3271 | 310 | scene_surface->request_client_surface_close(); | 354 | scene_surface->request_client_surface_close(); |
3272 | @@ -316,17 +360,18 @@ | |||
3273 | 316 | { | 360 | { |
3274 | 317 | bool is_focus_event_with_value(MirEvent const* event, MirSurfaceFocusState state) | 361 | bool is_focus_event_with_value(MirEvent const* event, MirSurfaceFocusState state) |
3275 | 318 | { | 362 | { |
3277 | 319 | if (mir_event_get_type(event) != mir_event_type_surface) | 363 | if (mir_event_get_type(event) != mir_event_type_window) |
3278 | 320 | { | 364 | { |
3279 | 321 | return false; | 365 | return false; |
3280 | 322 | } | 366 | } |
3281 | 323 | 367 | ||
3284 | 324 | auto surface_event = mir_event_get_surface_event(event); | 368 | auto window_event = mir_event_get_window_event(event); |
3285 | 325 | if (mir_surface_event_get_attribute(surface_event) != mir_surface_attrib_focus) | 369 | auto attrib = mir_window_event_get_attribute(window_event); |
3286 | 370 | if (attrib != mir_window_attrib_focus) | ||
3287 | 326 | { | 371 | { |
3288 | 327 | return false; | 372 | return false; |
3289 | 328 | } | 373 | } |
3291 | 329 | return mir_surface_event_get_attribute_value(surface_event) == state; | 374 | return mir_window_event_get_attribute_value(window_event) == state; |
3292 | 330 | } | 375 | } |
3293 | 331 | 376 | ||
3294 | 332 | bool is_focus_event(MirEvent const* event) | 377 | bool is_focus_event(MirEvent const* event) |
3295 | @@ -467,7 +512,7 @@ | |||
3296 | 467 | 512 | ||
3297 | 468 | void raise_signal_on_close_event(MirSurface*, MirEvent const* ev, void* ctx) | 513 | void raise_signal_on_close_event(MirSurface*, MirEvent const* ev, void* ctx) |
3298 | 469 | { | 514 | { |
3300 | 470 | if (mir_event_get_type(ev) == mir_event_type_close_surface) | 515 | if (mir_event_get_type(ev) == mir_event_type_close_window) |
3301 | 471 | { | 516 | { |
3302 | 472 | #pragma GCC diagnostic push | 517 | #pragma GCC diagnostic push |
3303 | 473 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 518 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
3304 | @@ -521,7 +566,7 @@ | |||
3305 | 521 | 566 | ||
3306 | 522 | void surface_output_capturing_callback(MirSurface*, MirEvent const* ev, void* ctx) | 567 | void surface_output_capturing_callback(MirSurface*, MirEvent const* ev, void* ctx) |
3307 | 523 | { | 568 | { |
3309 | 524 | if (mir_event_get_type(ev) == mir_event_type_surface_output) | 569 | if (mir_event_get_type(ev) == mir_event_type_window_output) |
3310 | 525 | { | 570 | { |
3311 | 526 | auto out_event = reinterpret_cast<EventContext*>(ctx); | 571 | auto out_event = reinterpret_cast<EventContext*>(ctx); |
3312 | 527 | out_event->event = mir_event_ref(ev); | 572 | out_event->event = mir_event_ref(ev); |
3313 | @@ -558,7 +603,7 @@ | |||
3314 | 558 | 603 | ||
3315 | 559 | ASSERT_FALSE(current_mode.empty()); | 604 | ASSERT_FALSE(current_mode.empty()); |
3316 | 560 | 605 | ||
3318 | 561 | set_event_filter(mir_event_type_surface_output); | 606 | set_event_filter(mir_event_type_window_output); |
3319 | 562 | reset_last_event(); | 607 | reset_last_event(); |
3320 | 563 | 608 | ||
3321 | 564 | auto const display_controller = server.the_display_configuration_controller(); | 609 | auto const display_controller = server.the_display_configuration_controller(); |
3322 | @@ -581,14 +626,14 @@ | |||
3323 | 581 | mir_window_spec_release(spec); | 626 | mir_window_spec_release(spec); |
3324 | 582 | 627 | ||
3325 | 583 | ASSERT_TRUE(context.captured.wait_for(10s)); | 628 | ASSERT_TRUE(context.captured.wait_for(10s)); |
3331 | 584 | ASSERT_THAT(mir_event_get_type(context.event), Eq(mir_event_type_surface_output)); | 629 | ASSERT_THAT(mir_event_get_type(context.event), Eq(mir_event_type_window_output)); |
3332 | 585 | auto surface_event = mir_event_get_surface_output_event(context.event); | 630 | auto window_event = mir_event_get_window_output_event(context.event); |
3333 | 586 | EXPECT_THAT(mir_surface_output_event_get_form_factor(surface_event), Eq(form_factor)); | 631 | EXPECT_THAT(mir_window_output_event_get_form_factor(window_event), Eq(form_factor)); |
3334 | 587 | EXPECT_THAT(mir_surface_output_event_get_scale(surface_event), Eq(scale)); | 632 | EXPECT_THAT(mir_window_output_event_get_scale(window_event), Eq(scale)); |
3335 | 588 | auto id = mir_surface_output_event_get_output_id(surface_event); | 633 | auto id = mir_window_output_event_get_output_id(window_event); |
3336 | 589 | EXPECT_THAT(display_ids, Contains(Eq(id))); | 634 | EXPECT_THAT(display_ids, Contains(Eq(id))); |
3337 | 590 | ASSERT_THAT(current_mode.find(id), Ne(current_mode.end())); | 635 | ASSERT_THAT(current_mode.find(id), Ne(current_mode.end())); |
3339 | 591 | EXPECT_THAT(mir_surface_output_event_get_refresh_rate(surface_event), | 636 | EXPECT_THAT(mir_window_output_event_get_refresh_rate(window_event), |
3340 | 592 | Eq(current_mode[id].vrefresh_hz)); | 637 | Eq(current_mode[id].vrefresh_hz)); |
3341 | 593 | 638 | ||
3342 | 594 | mir_window_release_sync(window); | 639 | mir_window_release_sync(window); |
3343 | 595 | 640 | ||
3344 | === modified file 'tests/acceptance-tests/test_client_surface_visibility.cpp' | |||
3345 | --- tests/acceptance-tests/test_client_surface_visibility.cpp 2017-01-09 06:48:47 +0000 | |||
3346 | +++ tests/acceptance-tests/test_client_surface_visibility.cpp 2017-01-10 20:52:04 +0000 | |||
3347 | @@ -90,17 +90,18 @@ | |||
3348 | 90 | 90 | ||
3349 | 91 | void event_callback(MirWindow* window, MirEvent const* event, void* ctx) | 91 | void event_callback(MirWindow* window, MirEvent const* event, void* ctx) |
3350 | 92 | { | 92 | { |
3352 | 93 | if (mir_event_get_type(event) != mir_event_type_surface) | 93 | if (mir_event_get_type(event) != mir_event_type_window) |
3353 | 94 | return; | 94 | return; |
3356 | 95 | auto sev = mir_event_get_surface_event(event); | 95 | auto sev = mir_event_get_window_event(event); |
3357 | 96 | if (mir_surface_event_get_attribute(sev) != mir_surface_attrib_visibility) | 96 | auto attrib = mir_window_event_get_attribute(sev); |
3358 | 97 | if (attrib != mir_window_attrib_visibility) | ||
3359 | 97 | return; | 98 | return; |
3360 | 98 | 99 | ||
3361 | 99 | auto const mock_callback = | 100 | auto const mock_callback = |
3362 | 100 | reinterpret_cast<testing::NiceMock<MockVisibilityCallback>*>(ctx); | 101 | reinterpret_cast<testing::NiceMock<MockVisibilityCallback>*>(ctx); |
3363 | 101 | mock_callback->handle( | 102 | mock_callback->handle( |
3364 | 102 | window, | 103 | window, |
3366 | 103 | static_cast<MirSurfaceVisibility>(mir_surface_event_get_attribute_value(sev))); | 104 | static_cast<MirSurfaceVisibility>(mir_window_event_get_attribute_value(sev))); |
3367 | 104 | } | 105 | } |
3368 | 105 | 106 | ||
3369 | 106 | MirSurface* create_surface(MirConnection* connection, const char* name, geom::Size size, | 107 | MirSurface* create_surface(MirConnection* connection, const char* name, geom::Size size, |
3370 | 107 | 108 | ||
3371 | === modified file 'tests/acceptance-tests/test_client_surfaces.cpp' | |||
3372 | --- tests/acceptance-tests/test_client_surfaces.cpp 2017-01-09 06:48:47 +0000 | |||
3373 | +++ tests/acceptance-tests/test_client_surfaces.cpp 2017-01-10 20:52:04 +0000 | |||
3374 | @@ -176,7 +176,7 @@ | |||
3375 | 176 | mir_window_spec_release(spec); | 176 | mir_window_spec_release(spec); |
3376 | 177 | 177 | ||
3377 | 178 | ASSERT_THAT(menu, IsValid()); | 178 | ASSERT_THAT(menu, IsValid()); |
3379 | 179 | EXPECT_EQ(mir_surface_get_type(menu), mir_surface_type_menu); | 179 | EXPECT_EQ(mir_window_get_type(menu), mir_window_type_menu); |
3380 | 180 | 180 | ||
3381 | 181 | mir_window_release_sync(parent); | 181 | mir_window_release_sync(parent); |
3382 | 182 | mir_window_release_sync(menu); | 182 | mir_window_release_sync(menu); |
3383 | @@ -196,7 +196,7 @@ | |||
3384 | 196 | mir_window_spec_release(spec); | 196 | mir_window_spec_release(spec); |
3385 | 197 | 197 | ||
3386 | 198 | ASSERT_THAT(tooltip, IsValid()); | 198 | ASSERT_THAT(tooltip, IsValid()); |
3388 | 199 | EXPECT_EQ(mir_surface_get_type(tooltip), mir_surface_type_tip); | 199 | EXPECT_EQ(mir_window_get_type(tooltip), mir_window_type_tip); |
3389 | 200 | 200 | ||
3390 | 201 | mir_window_release_sync(parent); | 201 | mir_window_release_sync(parent); |
3391 | 202 | mir_window_release_sync(tooltip); | 202 | mir_window_release_sync(tooltip); |
3392 | @@ -212,7 +212,7 @@ | |||
3393 | 212 | mir_window_spec_release(spec); | 212 | mir_window_spec_release(spec); |
3394 | 213 | 213 | ||
3395 | 214 | ASSERT_THAT(dialog, IsValid()); | 214 | ASSERT_THAT(dialog, IsValid()); |
3397 | 215 | EXPECT_EQ(mir_surface_get_type(dialog), mir_surface_type_dialog); | 215 | EXPECT_EQ(mir_window_get_type(dialog), mir_window_type_dialog); |
3398 | 216 | 216 | ||
3399 | 217 | mir_window_release_sync(dialog); | 217 | mir_window_release_sync(dialog); |
3400 | 218 | } | 218 | } |
3401 | @@ -228,7 +228,7 @@ | |||
3402 | 228 | mir_window_spec_release(spec); | 228 | mir_window_spec_release(spec); |
3403 | 229 | 229 | ||
3404 | 230 | ASSERT_THAT(dialog, IsValid()); | 230 | ASSERT_THAT(dialog, IsValid()); |
3406 | 231 | EXPECT_EQ(mir_surface_get_type(dialog), mir_surface_type_dialog); | 231 | EXPECT_EQ(mir_window_get_type(dialog), mir_window_type_dialog); |
3407 | 232 | 232 | ||
3408 | 233 | mir_window_release_sync(parent); | 233 | mir_window_release_sync(parent); |
3409 | 234 | mir_window_release_sync(dialog); | 234 | mir_window_release_sync(dialog); |
3410 | @@ -243,7 +243,7 @@ | |||
3411 | 243 | auto im = mir_window_create_sync(spec); | 243 | auto im = mir_window_create_sync(spec); |
3412 | 244 | mir_window_spec_release(spec); | 244 | mir_window_spec_release(spec); |
3413 | 245 | 245 | ||
3415 | 246 | EXPECT_EQ(mir_surface_get_type(im), mir_surface_type_inputmethod); | 246 | EXPECT_EQ(mir_window_get_type(im), mir_window_type_inputmethod); |
3416 | 247 | 247 | ||
3417 | 248 | mir_window_release_sync(im); | 248 | mir_window_release_sync(im); |
3418 | 249 | } | 249 | } |
3419 | 250 | 250 | ||
3420 | === modified file 'tests/acceptance-tests/test_confined_pointer.cpp' | |||
3421 | --- tests/acceptance-tests/test_confined_pointer.cpp 2017-01-09 06:48:47 +0000 | |||
3422 | +++ tests/acceptance-tests/test_confined_pointer.cpp 2017-01-10 20:52:04 +0000 | |||
3423 | @@ -110,16 +110,16 @@ | |||
3424 | 110 | mir_window_spec_release(spec); | 110 | mir_window_spec_release(spec); |
3425 | 111 | } | 111 | } |
3426 | 112 | 112 | ||
3428 | 113 | void handle_surface_event(MirSurfaceEvent const* event) | 113 | void handle_window_event(MirSurfaceEvent const* event) |
3429 | 114 | { | 114 | { |
3432 | 115 | auto const attrib = mir_surface_event_get_attribute(event); | 115 | auto const attrib = mir_window_event_get_attribute(event); |
3433 | 116 | auto const value = mir_surface_event_get_attribute_value(event); | 116 | auto const value = mir_window_event_get_attribute_value(event); |
3434 | 117 | 117 | ||
3436 | 118 | if (mir_surface_attrib_visibility == attrib && | 118 | if (mir_window_attrib_visibility == attrib && |
3437 | 119 | mir_surface_visibility_exposed == value) | 119 | mir_surface_visibility_exposed == value) |
3438 | 120 | exposed = true; | 120 | exposed = true; |
3439 | 121 | 121 | ||
3441 | 122 | if (mir_surface_attrib_focus == attrib && | 122 | if (mir_window_attrib_focus == attrib && |
3442 | 123 | mir_surface_focused == value) | 123 | mir_surface_focused == value) |
3443 | 124 | focused = true; | 124 | focused = true; |
3444 | 125 | 125 | ||
3445 | @@ -133,8 +133,8 @@ | |||
3446 | 133 | auto type = mir_event_get_type(ev); | 133 | auto type = mir_event_get_type(ev); |
3447 | 134 | switch (type) | 134 | switch (type) |
3448 | 135 | { | 135 | { |
3451 | 136 | case mir_event_type_surface: | 136 | case mir_event_type_window: |
3452 | 137 | client->handle_surface_event(mir_event_get_surface_event(ev)); | 137 | client->handle_window_event(mir_event_get_window_event(ev)); |
3453 | 138 | break; | 138 | break; |
3454 | 139 | case mir_event_type_input: | 139 | case mir_event_type_input: |
3455 | 140 | client->handle_input(ev); | 140 | client->handle_input(ev); |
3456 | 141 | 141 | ||
3457 | === modified file 'tests/acceptance-tests/test_custom_window_management.cpp' | |||
3458 | --- tests/acceptance-tests/test_custom_window_management.cpp 2017-01-09 06:48:47 +0000 | |||
3459 | +++ tests/acceptance-tests/test_custom_window_management.cpp 2017-01-10 20:52:04 +0000 | |||
3460 | @@ -19,6 +19,7 @@ | |||
3461 | 19 | #include "mir/geometry/rectangle.h" | 19 | #include "mir/geometry/rectangle.h" |
3462 | 20 | #include "mir/scene/session.h" | 20 | #include "mir/scene/session.h" |
3463 | 21 | #include "mir_toolkit/events/surface_placement.h" | 21 | #include "mir_toolkit/events/surface_placement.h" |
3464 | 22 | #include "mir_toolkit/events/window_placement.h" | ||
3465 | 22 | #include "mir/events/event_builders.h" | 23 | #include "mir/events/event_builders.h" |
3466 | 23 | #include "mir/scene/surface.h" | 24 | #include "mir/scene/surface.h" |
3467 | 24 | 25 | ||
3468 | @@ -279,7 +280,7 @@ | |||
3469 | 279 | 280 | ||
3470 | 280 | mt::Signal received; | 281 | mt::Signal received; |
3471 | 281 | 282 | ||
3473 | 282 | EXPECT_CALL(window_manager, set_surface_attribute(_, WeakPtrEq(server_surface[i]), mir_surface_attrib_state,_)) | 283 | EXPECT_CALL(window_manager, set_surface_attribute(_, WeakPtrEq(server_surface[i]), mir_window_attrib_state,_)) |
3474 | 283 | .WillOnce(WithArg<3>(Invoke([&](int value) { received.raise(); return value; }))); | 284 | .WillOnce(WithArg<3>(Invoke([&](int value) { received.raise(); return value; }))); |
3475 | 284 | 285 | ||
3476 | 285 | mir_surface_set_state(client_surface[i], mir_surface_state_maximized); | 286 | mir_surface_set_state(client_surface[i], mir_surface_state_maximized); |
3477 | @@ -529,12 +530,12 @@ | |||
3478 | 529 | { | 530 | { |
3479 | 530 | PlacementCheck(MirRectangle const& placement) : expected_rect{placement} {} | 531 | PlacementCheck(MirRectangle const& placement) : expected_rect{placement} {} |
3480 | 531 | 532 | ||
3482 | 532 | void check(MirSurfacePlacementEvent const* placement_event) | 533 | void check(MirWindowPlacementEvent const* placement_event) |
3483 | 533 | { | 534 | { |
3488 | 534 | EXPECT_THAT(mir_surface_placement_get_relative_position(placement_event).top, Eq(expected_rect.top)); | 535 | EXPECT_THAT(mir_window_placement_get_relative_position(placement_event).top, Eq(expected_rect.top)); |
3489 | 535 | EXPECT_THAT(mir_surface_placement_get_relative_position(placement_event).left, Eq(expected_rect.left)); | 536 | EXPECT_THAT(mir_window_placement_get_relative_position(placement_event).left, Eq(expected_rect.left)); |
3490 | 536 | EXPECT_THAT(mir_surface_placement_get_relative_position(placement_event).height, Eq(expected_rect.height)); | 537 | EXPECT_THAT(mir_window_placement_get_relative_position(placement_event).height, Eq(expected_rect.height)); |
3491 | 537 | EXPECT_THAT(mir_surface_placement_get_relative_position(placement_event).width, Eq(expected_rect.width)); | 538 | EXPECT_THAT(mir_window_placement_get_relative_position(placement_event).width, Eq(expected_rect.width)); |
3492 | 538 | 539 | ||
3493 | 539 | received.raise(); | 540 | received.raise(); |
3494 | 540 | } | 541 | } |
3495 | @@ -551,7 +552,7 @@ | |||
3496 | 551 | 552 | ||
3497 | 552 | void surface_placement_event_callback(MirSurface* /*window*/, MirEvent const* event, void* context) | 553 | void surface_placement_event_callback(MirSurface* /*window*/, MirEvent const* event, void* context) |
3498 | 553 | { | 554 | { |
3500 | 554 | if (mir_event_get_type(event) == mir_event_type_surface_placement) | 555 | if (mir_event_get_type(event) == mir_event_type_window_placement) |
3501 | 555 | { | 556 | { |
3502 | 556 | auto const placement_event = mir_event_get_surface_placement_event(event); | 557 | auto const placement_event = mir_event_get_surface_placement_event(event); |
3503 | 557 | static_cast<PlacementCheck*>(context)->check(placement_event); | 558 | static_cast<PlacementCheck*>(context)->check(placement_event); |
3504 | 558 | 559 | ||
3505 | === modified file 'tests/acceptance-tests/test_nested_input.cpp' | |||
3506 | --- tests/acceptance-tests/test_nested_input.cpp 2017-01-09 06:48:47 +0000 | |||
3507 | +++ tests/acceptance-tests/test_nested_input.cpp 2017-01-10 20:52:04 +0000 | |||
3508 | @@ -139,16 +139,16 @@ | |||
3509 | 139 | 139 | ||
3510 | 140 | MOCK_METHOD1(handle_input, void(MirEvent const*)); | 140 | MOCK_METHOD1(handle_input, void(MirEvent const*)); |
3511 | 141 | 141 | ||
3513 | 142 | void handle_surface_event(MirSurfaceEvent const* event) | 142 | void handle_window_event(MirWindowEvent const* event) |
3514 | 143 | { | 143 | { |
3517 | 144 | auto const attrib = mir_surface_event_get_attribute(event); | 144 | auto const attrib = mir_window_event_get_attribute(event); |
3518 | 145 | auto const value = mir_surface_event_get_attribute_value(event); | 145 | auto const value = mir_window_event_get_attribute_value(event); |
3519 | 146 | 146 | ||
3521 | 147 | if (mir_surface_attrib_visibility == attrib && | 147 | if (mir_window_attrib_visibility == attrib && |
3522 | 148 | mir_surface_visibility_exposed == value) | 148 | mir_surface_visibility_exposed == value) |
3523 | 149 | exposed = true; | 149 | exposed = true; |
3524 | 150 | 150 | ||
3526 | 151 | if (mir_surface_attrib_focus == attrib && | 151 | if (mir_window_attrib_focus == attrib && |
3527 | 152 | mir_surface_focused == value) | 152 | mir_surface_focused == value) |
3528 | 153 | focused = true; | 153 | focused = true; |
3529 | 154 | 154 | ||
3530 | @@ -160,10 +160,10 @@ | |||
3531 | 160 | { | 160 | { |
3532 | 161 | auto const client = static_cast<ExposedSurface*>(context); | 161 | auto const client = static_cast<ExposedSurface*>(context); |
3533 | 162 | auto type = mir_event_get_type(ev); | 162 | auto type = mir_event_get_type(ev); |
3535 | 163 | if (type == mir_event_type_surface) | 163 | if (type == mir_event_type_window) |
3536 | 164 | { | 164 | { |
3539 | 165 | auto surface_event = mir_event_get_surface_event(ev); | 165 | auto window_event = mir_event_get_window_event(ev); |
3540 | 166 | client->handle_surface_event(surface_event); | 166 | client->handle_window_event(window_event); |
3541 | 167 | 167 | ||
3542 | 168 | } | 168 | } |
3543 | 169 | if (type == mir_event_type_input) | 169 | if (type == mir_event_type_input) |
3544 | 170 | 170 | ||
3545 | === modified file 'tests/acceptance-tests/test_nested_mir.cpp' | |||
3546 | --- tests/acceptance-tests/test_nested_mir.cpp 2017-01-09 06:48:47 +0000 | |||
3547 | +++ tests/acceptance-tests/test_nested_mir.cpp 2017-01-10 20:52:04 +0000 | |||
3548 | @@ -364,7 +364,7 @@ | |||
3549 | 364 | int set_surface_attribute( | 364 | int set_surface_attribute( |
3550 | 365 | std::shared_ptr<msc::Session> const& session, | 365 | std::shared_ptr<msc::Session> const& session, |
3551 | 366 | std::shared_ptr<msc::Surface> const& window, | 366 | std::shared_ptr<msc::Surface> const& window, |
3553 | 367 | MirSurfaceAttrib attrib, | 367 | MirWindowAttrib attrib, |
3554 | 368 | int value) override | 368 | int value) override |
3555 | 369 | { | 369 | { |
3556 | 370 | return wrapped->set_surface_attribute(session, window, attrib, value); | 370 | return wrapped->set_surface_attribute(session, window, attrib, value); |
3557 | @@ -372,7 +372,7 @@ | |||
3558 | 372 | 372 | ||
3559 | 373 | int get_surface_attribute( | 373 | int get_surface_attribute( |
3560 | 374 | std::shared_ptr<msc::Surface> const& window, | 374 | std::shared_ptr<msc::Surface> const& window, |
3562 | 375 | MirSurfaceAttrib attrib) override | 375 | MirWindowAttrib attrib) override |
3563 | 376 | { | 376 | { |
3564 | 377 | return wrapped->get_surface_attribute(window, attrib); | 377 | return wrapped->get_surface_attribute(window, attrib); |
3565 | 378 | } | 378 | } |
3566 | @@ -778,11 +778,11 @@ | |||
3567 | 778 | mt::Signal surface_event_received; | 778 | mt::Signal surface_event_received; |
3568 | 779 | mir_window_spec_set_event_handler(spec, [](MirSurface*, MirEvent const* event, void* ctx) | 779 | mir_window_spec_set_event_handler(spec, [](MirSurface*, MirEvent const* event, void* ctx) |
3569 | 780 | { | 780 | { |
3571 | 781 | if (mir_event_get_type(event) == mir_event_type_surface_output) | 781 | if (mir_event_get_type(event) == mir_event_type_window_output) |
3572 | 782 | { | 782 | { |
3576 | 783 | auto surface_event = mir_event_get_surface_output_event(event); | 783 | auto surface_event = mir_event_get_window_output_event(event); |
3577 | 784 | EXPECT_THAT(mir_surface_output_event_get_form_factor(surface_event), Eq(expected_form_factor)); | 784 | EXPECT_THAT(mir_window_output_event_get_form_factor(surface_event), Eq(expected_form_factor)); |
3578 | 785 | EXPECT_THAT(mir_surface_output_event_get_scale(surface_event), Eq(expected_scale)); | 785 | EXPECT_THAT(mir_window_output_event_get_scale(surface_event), Eq(expected_scale)); |
3579 | 786 | auto signal = static_cast<mt::Signal*>(ctx); | 786 | auto signal = static_cast<mt::Signal*>(ctx); |
3580 | 787 | signal->raise(); | 787 | signal->raise(); |
3581 | 788 | } | 788 | } |
3582 | 789 | 789 | ||
3583 | === modified file 'tests/acceptance-tests/test_new_display_configuration.cpp' | |||
3584 | --- tests/acceptance-tests/test_new_display_configuration.cpp 2017-01-09 06:48:47 +0000 | |||
3585 | +++ tests/acceptance-tests/test_new_display_configuration.cpp 2017-01-10 20:52:04 +0000 | |||
3586 | @@ -281,14 +281,14 @@ | |||
3587 | 281 | { | 281 | { |
3588 | 282 | auto const client = static_cast<SimpleClient*>(context); | 282 | auto const client = static_cast<SimpleClient*>(context); |
3589 | 283 | auto type = mir_event_get_type(ev); | 283 | auto type = mir_event_get_type(ev); |
3591 | 284 | if (type == mir_event_type_surface) | 284 | if (type == mir_event_type_window) |
3592 | 285 | { | 285 | { |
3596 | 286 | auto surface_event = mir_event_get_surface_event(ev); | 286 | auto window_event = mir_event_get_window_event(ev); |
3597 | 287 | auto const attrib = mir_surface_event_get_attribute(surface_event); | 287 | auto const attrib = mir_window_event_get_attribute(window_event); |
3598 | 288 | auto const value = mir_surface_event_get_attribute_value(surface_event); | 288 | auto const value = mir_window_event_get_attribute_value(window_event); |
3599 | 289 | 289 | ||
3600 | 290 | std::lock_guard<std::mutex> lk(client->mutex); | 290 | std::lock_guard<std::mutex> lk(client->mutex); |
3602 | 291 | if (mir_surface_attrib_focus == attrib && | 291 | if (mir_window_attrib_focus == attrib && |
3603 | 292 | mir_surface_focused == value) | 292 | mir_surface_focused == value) |
3604 | 293 | client->ready_to_accept_events.raise(); | 293 | client->ready_to_accept_events.raise(); |
3605 | 294 | } | 294 | } |
3606 | 295 | 295 | ||
3607 | === modified file 'tests/acceptance-tests/test_surface_morphing.cpp' | |||
3608 | --- tests/acceptance-tests/test_surface_morphing.cpp 2017-01-09 06:48:47 +0000 | |||
3609 | +++ tests/acceptance-tests/test_surface_morphing.cpp 2017-01-10 20:52:04 +0000 | |||
3610 | @@ -57,7 +57,7 @@ | |||
3611 | 57 | { | 57 | { |
3612 | 58 | public: | 58 | public: |
3613 | 59 | MOCK_METHOD1(renamed, void(char const*)); | 59 | MOCK_METHOD1(renamed, void(char const*)); |
3615 | 60 | MOCK_METHOD2(attrib_changed, void(MirSurfaceAttrib attrib, int value)); | 60 | MOCK_METHOD2(attrib_changed, void(MirWindowAttrib attrib, int value)); |
3616 | 61 | }; | 61 | }; |
3617 | 62 | 62 | ||
3618 | 63 | struct SurfaceMorphing : mtf::ConnectedClientHeadlessServer | 63 | struct SurfaceMorphing : mtf::ConnectedClientHeadlessServer |
3619 | @@ -158,8 +158,8 @@ | |||
3620 | 158 | 158 | ||
3621 | 159 | struct TypePair | 159 | struct TypePair |
3622 | 160 | { | 160 | { |
3625 | 161 | MirSurfaceType from; | 161 | MirWindowType from; |
3626 | 162 | MirSurfaceType to; | 162 | MirWindowType to; |
3627 | 163 | 163 | ||
3628 | 164 | friend std::ostream& operator<<(std::ostream& out, TypePair const& types) | 164 | friend std::ostream& operator<<(std::ostream& out, TypePair const& types) |
3629 | 165 | { return out << "from:" << types.from << ", to:" << types.to; } | 165 | { return out << "from:" << types.from << ", to:" << types.to; } |
3630 | @@ -187,7 +187,7 @@ | |||
3631 | 187 | 187 | ||
3632 | 188 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); | 188 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
3633 | 189 | 189 | ||
3635 | 190 | EXPECT_CALL(surface_observer, attrib_changed(mir_surface_attrib_type, new_type)). | 190 | EXPECT_CALL(surface_observer, attrib_changed(mir_window_attrib_type, new_type)). |
3636 | 191 | WillOnce(InvokeWithoutArgs([&] { change_observed(); })); | 191 | WillOnce(InvokeWithoutArgs([&] { change_observed(); })); |
3637 | 192 | 192 | ||
3638 | 193 | change_surface(window, [&](MirWindowSpec* spec) | 193 | change_surface(window, [&](MirWindowSpec* spec) |
3639 | @@ -203,7 +203,7 @@ | |||
3640 | 203 | 203 | ||
3641 | 204 | auto const parent = create_surface([&](MirWindowSpec* spec) | 204 | auto const parent = create_surface([&](MirWindowSpec* spec) |
3642 | 205 | { | 205 | { |
3644 | 206 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 206 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3645 | 207 | mir_window_spec_set_width(spec, width); | 207 | mir_window_spec_set_width(spec, width); |
3646 | 208 | mir_window_spec_set_height(spec, height); | 208 | mir_window_spec_set_height(spec, height); |
3647 | 209 | mir_window_spec_set_pixel_format(spec, pixel_format); | 209 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3648 | @@ -221,7 +221,7 @@ | |||
3649 | 221 | 221 | ||
3650 | 222 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); | 222 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
3651 | 223 | 223 | ||
3653 | 224 | EXPECT_CALL(surface_observer, attrib_changed(mir_surface_attrib_type, new_type)). | 224 | EXPECT_CALL(surface_observer, attrib_changed(mir_window_attrib_type, new_type)). |
3654 | 225 | Times(0); | 225 | Times(0); |
3655 | 226 | 226 | ||
3656 | 227 | change_surface(window, [&](MirWindowSpec* spec) | 227 | change_surface(window, [&](MirWindowSpec* spec) |
3657 | @@ -244,7 +244,7 @@ | |||
3658 | 244 | 244 | ||
3659 | 245 | auto const parent = create_surface([&](MirWindowSpec* spec) | 245 | auto const parent = create_surface([&](MirWindowSpec* spec) |
3660 | 246 | { | 246 | { |
3662 | 247 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 247 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3663 | 248 | mir_window_spec_set_width(spec, width); | 248 | mir_window_spec_set_width(spec, width); |
3664 | 249 | mir_window_spec_set_height(spec, height); | 249 | mir_window_spec_set_height(spec, height); |
3665 | 250 | mir_window_spec_set_pixel_format(spec, pixel_format); | 250 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3666 | @@ -262,7 +262,7 @@ | |||
3667 | 262 | 262 | ||
3668 | 263 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); | 263 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
3669 | 264 | 264 | ||
3671 | 265 | EXPECT_CALL(surface_observer, attrib_changed(mir_surface_attrib_type, new_type)). | 265 | EXPECT_CALL(surface_observer, attrib_changed(mir_window_attrib_type, new_type)). |
3672 | 266 | WillOnce(InvokeWithoutArgs([&] { change_observed(); })); | 266 | WillOnce(InvokeWithoutArgs([&] { change_observed(); })); |
3673 | 267 | 267 | ||
3674 | 268 | change_surface(window, [&](MirWindowSpec* spec) | 268 | change_surface(window, [&](MirWindowSpec* spec) |
3675 | @@ -288,7 +288,7 @@ | |||
3676 | 288 | 288 | ||
3677 | 289 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); | 289 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
3678 | 290 | 290 | ||
3680 | 291 | EXPECT_CALL(surface_observer, attrib_changed(mir_surface_attrib_type, new_type)). | 291 | EXPECT_CALL(surface_observer, attrib_changed(mir_window_attrib_type, new_type)). |
3681 | 292 | Times(0); | 292 | Times(0); |
3682 | 293 | 293 | ||
3683 | 294 | change_surface(window, [&](MirWindowSpec* spec) | 294 | change_surface(window, [&](MirWindowSpec* spec) |
3684 | @@ -310,7 +310,7 @@ | |||
3685 | 310 | 310 | ||
3686 | 311 | auto const parent = create_surface([&](MirWindowSpec* spec) | 311 | auto const parent = create_surface([&](MirWindowSpec* spec) |
3687 | 312 | { | 312 | { |
3689 | 313 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 313 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3690 | 314 | mir_window_spec_set_width(spec, width); | 314 | mir_window_spec_set_width(spec, width); |
3691 | 315 | mir_window_spec_set_height(spec, height); | 315 | mir_window_spec_set_height(spec, height); |
3692 | 316 | mir_window_spec_set_pixel_format(spec, pixel_format); | 316 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3693 | @@ -328,7 +328,7 @@ | |||
3694 | 328 | 328 | ||
3695 | 329 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); | 329 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
3696 | 330 | 330 | ||
3698 | 331 | EXPECT_CALL(surface_observer, attrib_changed(mir_surface_attrib_type, new_type)). | 331 | EXPECT_CALL(surface_observer, attrib_changed(mir_window_attrib_type, new_type)). |
3699 | 332 | WillOnce(InvokeWithoutArgs([&] { change_observed(); })); | 332 | WillOnce(InvokeWithoutArgs([&] { change_observed(); })); |
3700 | 333 | 333 | ||
3701 | 334 | change_surface(window, [&](MirWindowSpec* spec) | 334 | change_surface(window, [&](MirWindowSpec* spec) |
3702 | @@ -345,7 +345,7 @@ | |||
3703 | 345 | 345 | ||
3704 | 346 | auto const parent = create_surface([&](MirWindowSpec* spec) | 346 | auto const parent = create_surface([&](MirWindowSpec* spec) |
3705 | 347 | { | 347 | { |
3707 | 348 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 348 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3708 | 349 | mir_window_spec_set_width(spec, width); | 349 | mir_window_spec_set_width(spec, width); |
3709 | 350 | mir_window_spec_set_height(spec, height); | 350 | mir_window_spec_set_height(spec, height); |
3710 | 351 | mir_window_spec_set_pixel_format(spec, pixel_format); | 351 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3711 | @@ -363,7 +363,7 @@ | |||
3712 | 363 | 363 | ||
3713 | 364 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); | 364 | latest_shell_surface()->add_observer(mt::fake_shared(surface_observer)); |
3714 | 365 | 365 | ||
3716 | 366 | EXPECT_CALL(surface_observer, attrib_changed(mir_surface_attrib_type, new_type)). | 366 | EXPECT_CALL(surface_observer, attrib_changed(mir_window_attrib_type, new_type)). |
3717 | 367 | WillOnce(InvokeWithoutArgs([&] { change_observed(); })); | 367 | WillOnce(InvokeWithoutArgs([&] { change_observed(); })); |
3718 | 368 | 368 | ||
3719 | 369 | 369 | ||
3720 | @@ -375,21 +375,21 @@ | |||
3721 | 375 | 375 | ||
3722 | 376 | INSTANTIATE_TEST_CASE_P(SurfaceMorphing, TargetWithoutParent, | 376 | INSTANTIATE_TEST_CASE_P(SurfaceMorphing, TargetWithoutParent, |
3723 | 377 | Values( | 377 | Values( |
3728 | 378 | TypePair{mir_surface_type_normal, mir_surface_type_utility}, | 378 | TypePair{mir_window_type_normal, mir_window_type_utility}, |
3729 | 379 | TypePair{mir_surface_type_utility, mir_surface_type_normal}, | 379 | TypePair{mir_window_type_utility, mir_window_type_normal}, |
3730 | 380 | TypePair{mir_surface_type_dialog, mir_surface_type_utility}, | 380 | TypePair{mir_window_type_dialog, mir_window_type_utility}, |
3731 | 381 | TypePair{mir_surface_type_dialog, mir_surface_type_normal} | 381 | TypePair{mir_window_type_dialog, mir_window_type_normal} |
3732 | 382 | )); | 382 | )); |
3733 | 383 | 383 | ||
3734 | 384 | INSTANTIATE_TEST_CASE_P(SurfaceMorphing, TargetNeedingParent, | 384 | INSTANTIATE_TEST_CASE_P(SurfaceMorphing, TargetNeedingParent, |
3735 | 385 | Values( | 385 | Values( |
3739 | 386 | TypePair{mir_surface_type_normal, mir_surface_type_satellite}, | 386 | TypePair{mir_window_type_normal, mir_window_type_satellite}, |
3740 | 387 | TypePair{mir_surface_type_utility, mir_surface_type_satellite}, | 387 | TypePair{mir_window_type_utility, mir_window_type_satellite}, |
3741 | 388 | TypePair{mir_surface_type_dialog, mir_surface_type_satellite} | 388 | TypePair{mir_window_type_dialog, mir_window_type_satellite} |
3742 | 389 | )); | 389 | )); |
3743 | 390 | 390 | ||
3744 | 391 | INSTANTIATE_TEST_CASE_P(SurfaceMorphing, TargetMayHaveParent, | 391 | INSTANTIATE_TEST_CASE_P(SurfaceMorphing, TargetMayHaveParent, |
3745 | 392 | Values( | 392 | Values( |
3748 | 393 | TypePair{mir_surface_type_normal, mir_surface_type_dialog}, | 393 | TypePair{mir_window_type_normal, mir_window_type_dialog}, |
3749 | 394 | TypePair{mir_surface_type_utility, mir_surface_type_dialog} | 394 | TypePair{mir_window_type_utility, mir_window_type_dialog} |
3750 | 395 | )); | 395 | )); |
3751 | 396 | 396 | ||
3752 | === modified file 'tests/acceptance-tests/test_surface_placement.cpp' | |||
3753 | --- tests/acceptance-tests/test_surface_placement.cpp 2017-01-09 06:48:47 +0000 | |||
3754 | +++ tests/acceptance-tests/test_surface_placement.cpp 2017-01-10 20:52:04 +0000 | |||
3755 | @@ -461,7 +461,7 @@ | |||
3756 | 461 | mir_window_release_sync(window); | 461 | mir_window_release_sync(window); |
3757 | 462 | } | 462 | } |
3758 | 463 | 463 | ||
3760 | 464 | struct UnparentedSurface : SurfacePlacement, ::testing::WithParamInterface<MirSurfaceType> {}; | 464 | struct UnparentedSurface : SurfacePlacement, ::testing::WithParamInterface<MirWindowType> {}; |
3761 | 465 | 465 | ||
3762 | 466 | TEST_P(UnparentedSurface, small_window_is_optically_centered_on_first_display) | 466 | TEST_P(UnparentedSurface, small_window_is_optically_centered_on_first_display) |
3763 | 467 | { | 467 | { |
3764 | @@ -494,10 +494,10 @@ | |||
3765 | 494 | 494 | ||
3766 | 495 | INSTANTIATE_TEST_CASE_P(SurfacePlacement, UnparentedSurface, | 495 | INSTANTIATE_TEST_CASE_P(SurfacePlacement, UnparentedSurface, |
3767 | 496 | ::testing::Values( | 496 | ::testing::Values( |
3772 | 497 | mir_surface_type_normal, | 497 | mir_window_type_normal, |
3773 | 498 | mir_surface_type_utility, | 498 | mir_window_type_utility, |
3774 | 499 | mir_surface_type_dialog, | 499 | mir_window_type_dialog, |
3775 | 500 | mir_surface_type_freestyle)); | 500 | mir_window_type_freestyle)); |
3776 | 501 | 501 | ||
3777 | 502 | // Parented dialog or parented freestyle window | 502 | // Parented dialog or parented freestyle window |
3778 | 503 | // | 503 | // |
3779 | @@ -519,7 +519,7 @@ | |||
3780 | 519 | // relative to its parent | 519 | // relative to its parent |
3781 | 520 | // TODO tests for this | 520 | // TODO tests for this |
3782 | 521 | 521 | ||
3784 | 522 | struct ParentedSurface : SurfacePlacement, ::testing::WithParamInterface<MirSurfaceType> {}; | 522 | struct ParentedSurface : SurfacePlacement, ::testing::WithParamInterface<MirWindowType> {}; |
3785 | 523 | 523 | ||
3786 | 524 | TEST_P(ParentedSurface, small_window_is_optically_centered_on_parent) | 524 | TEST_P(ParentedSurface, small_window_is_optically_centered_on_parent) |
3787 | 525 | { | 525 | { |
3788 | @@ -557,9 +557,9 @@ | |||
3789 | 557 | 557 | ||
3790 | 558 | INSTANTIATE_TEST_CASE_P(SurfacePlacement, ParentedSurface, | 558 | INSTANTIATE_TEST_CASE_P(SurfacePlacement, ParentedSurface, |
3791 | 559 | ::testing::Values( | 559 | ::testing::Values( |
3798 | 560 | mir_surface_type_dialog, | 560 | mir_window_type_dialog, |
3799 | 561 | mir_surface_type_satellite, | 561 | mir_window_type_satellite, |
3800 | 562 | mir_surface_type_popover, | 562 | mir_window_type_popover, |
3801 | 563 | mir_surface_type_gloss, | 563 | mir_window_type_gloss, |
3802 | 564 | mir_surface_type_tip, | 564 | mir_window_type_tip, |
3803 | 565 | mir_surface_type_freestyle)); | 565 | mir_window_type_freestyle)); |
3804 | 566 | 566 | ||
3805 | === modified file 'tests/acceptance-tests/test_surface_raise.cpp' | |||
3806 | --- tests/acceptance-tests/test_surface_raise.cpp 2017-01-09 20:01:45 +0000 | |||
3807 | +++ tests/acceptance-tests/test_surface_raise.cpp 2017-01-10 20:52:04 +0000 | |||
3808 | @@ -112,21 +112,21 @@ | |||
3809 | 112 | auto const event_type = mir_event_get_type(ev); | 112 | auto const event_type = mir_event_get_type(ev); |
3810 | 113 | auto raise_surfaces = static_cast<RaiseSurfaces*>(ctx); | 113 | auto raise_surfaces = static_cast<RaiseSurfaces*>(ctx); |
3811 | 114 | 114 | ||
3813 | 115 | if (event_type == mir_event_type_surface) | 115 | if (event_type == mir_event_type_window) |
3814 | 116 | { | 116 | { |
3818 | 117 | auto event = mir_event_get_surface_event(ev); | 117 | auto event = mir_event_get_window_event(ev); |
3819 | 118 | auto const attrib = mir_surface_event_get_attribute(event); | 118 | auto const attrib = mir_window_event_get_attribute(event); |
3820 | 119 | auto const value = mir_surface_event_get_attribute_value(event); | 119 | auto const value = mir_window_event_get_attribute_value(event); |
3821 | 120 | 120 | ||
3822 | 121 | std::lock_guard<std::mutex> lk(raise_surfaces->mutex); | 121 | std::lock_guard<std::mutex> lk(raise_surfaces->mutex); |
3823 | 122 | 122 | ||
3825 | 123 | if (attrib == mir_surface_attrib_visibility && | 123 | if (attrib == mir_window_attrib_visibility && |
3826 | 124 | value == mir_surface_visibility_exposed) | 124 | value == mir_surface_visibility_exposed) |
3827 | 125 | { | 125 | { |
3828 | 126 | raise_surfaces->exposed = true; | 126 | raise_surfaces->exposed = true; |
3829 | 127 | } | 127 | } |
3830 | 128 | 128 | ||
3832 | 129 | if (attrib == mir_surface_attrib_focus && | 129 | if (attrib == mir_window_attrib_focus && |
3833 | 130 | value == mir_surface_focused) | 130 | value == mir_surface_focused) |
3834 | 131 | { | 131 | { |
3835 | 132 | raise_surfaces->focused = true; | 132 | raise_surfaces->focused = true; |
3836 | 133 | 133 | ||
3837 | === modified file 'tests/acceptance-tests/test_surface_specification.cpp' | |||
3838 | --- tests/acceptance-tests/test_surface_specification.cpp 2017-01-09 06:48:47 +0000 | |||
3839 | +++ tests/acceptance-tests/test_surface_specification.cpp 2017-01-10 20:52:04 +0000 | |||
3840 | @@ -48,7 +48,7 @@ | |||
3841 | 48 | { | 48 | { |
3842 | 49 | public: | 49 | public: |
3843 | 50 | MOCK_METHOD1(renamed, void(char const*)); | 50 | MOCK_METHOD1(renamed, void(char const*)); |
3845 | 51 | MOCK_METHOD2(attrib_changed, void(MirSurfaceAttrib attrib, int value)); | 51 | MOCK_METHOD2(attrib_changed, void(MirWindowAttrib attrib, int value)); |
3846 | 52 | MOCK_METHOD1(resized_to, void(Size const& size)); | 52 | MOCK_METHOD1(resized_to, void(Size const& size)); |
3847 | 53 | }; | 53 | }; |
3848 | 54 | 54 | ||
3849 | @@ -179,7 +179,7 @@ | |||
3850 | 179 | } | 179 | } |
3851 | 180 | }; | 180 | }; |
3852 | 181 | 181 | ||
3854 | 182 | struct SurfaceSpecificationCase : SurfaceSpecification, ::testing::WithParamInterface<MirSurfaceType> {}; | 182 | struct SurfaceSpecificationCase : SurfaceSpecification, ::testing::WithParamInterface<MirWindowType> {}; |
3855 | 183 | using SurfaceWithoutParent = SurfaceSpecificationCase; | 183 | using SurfaceWithoutParent = SurfaceSpecificationCase; |
3856 | 184 | using SurfaceNeedingParent = SurfaceSpecificationCase; | 184 | using SurfaceNeedingParent = SurfaceSpecificationCase; |
3857 | 185 | using SurfaceMayHaveParent = SurfaceSpecificationCase; | 185 | using SurfaceMayHaveParent = SurfaceSpecificationCase; |
3858 | @@ -210,7 +210,7 @@ | |||
3859 | 210 | 210 | ||
3860 | 211 | auto const surface = create_surface([&](MirWindowSpec* spec) | 211 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3861 | 212 | { | 212 | { |
3863 | 213 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 213 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3864 | 214 | mir_window_spec_set_width(spec, width); | 214 | mir_window_spec_set_width(spec, width); |
3865 | 215 | mir_window_spec_set_height(spec, height); | 215 | mir_window_spec_set_height(spec, height); |
3866 | 216 | mir_window_spec_set_pixel_format(spec, pixel_format); | 216 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3867 | @@ -235,7 +235,7 @@ | |||
3868 | 235 | 235 | ||
3869 | 236 | auto const surface = create_surface([&](MirWindowSpec* spec) | 236 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3870 | 237 | { | 237 | { |
3872 | 238 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 238 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3873 | 239 | mir_window_spec_set_width(spec, width); | 239 | mir_window_spec_set_width(spec, width); |
3874 | 240 | mir_window_spec_set_height(spec, height); | 240 | mir_window_spec_set_height(spec, height); |
3875 | 241 | mir_window_spec_set_pixel_format(spec, pixel_format); | 241 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3876 | @@ -260,7 +260,7 @@ | |||
3877 | 260 | 260 | ||
3878 | 261 | auto const surface = create_surface([&](MirWindowSpec* spec) | 261 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3879 | 262 | { | 262 | { |
3881 | 263 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 263 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3882 | 264 | mir_window_spec_set_width(spec, width); | 264 | mir_window_spec_set_width(spec, width); |
3883 | 265 | mir_window_spec_set_height(spec, height); | 265 | mir_window_spec_set_height(spec, height); |
3884 | 266 | mir_window_spec_set_pixel_format(spec, pixel_format); | 266 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3885 | @@ -285,7 +285,7 @@ | |||
3886 | 285 | 285 | ||
3887 | 286 | auto const surface = create_surface([&](MirWindowSpec* spec) | 286 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3888 | 287 | { | 287 | { |
3890 | 288 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 288 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3891 | 289 | mir_window_spec_set_width(spec, width); | 289 | mir_window_spec_set_width(spec, width); |
3892 | 290 | mir_window_spec_set_height(spec, height); | 290 | mir_window_spec_set_height(spec, height); |
3893 | 291 | mir_window_spec_set_pixel_format(spec, pixel_format); | 291 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3894 | @@ -310,7 +310,7 @@ | |||
3895 | 310 | 310 | ||
3896 | 311 | auto const surface = create_surface([&](MirWindowSpec* spec) | 311 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3897 | 312 | { | 312 | { |
3899 | 313 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 313 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3900 | 314 | mir_window_spec_set_width(spec, width); | 314 | mir_window_spec_set_width(spec, width); |
3901 | 315 | mir_window_spec_set_height(spec, height); | 315 | mir_window_spec_set_height(spec, height); |
3902 | 316 | mir_window_spec_set_pixel_format(spec, pixel_format); | 316 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3903 | @@ -339,7 +339,7 @@ | |||
3904 | 339 | 339 | ||
3905 | 340 | auto const surface = create_surface([&](MirWindowSpec* spec) | 340 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3906 | 341 | { | 341 | { |
3908 | 342 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 342 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3909 | 343 | mir_window_spec_set_width(spec, width); | 343 | mir_window_spec_set_width(spec, width); |
3910 | 344 | mir_window_spec_set_height(spec, height); | 344 | mir_window_spec_set_height(spec, height); |
3911 | 345 | mir_window_spec_set_pixel_format(spec, pixel_format); | 345 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3912 | @@ -368,7 +368,7 @@ | |||
3913 | 368 | 368 | ||
3914 | 369 | auto const surface = create_surface([&](MirWindowSpec* spec) | 369 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3915 | 370 | { | 370 | { |
3917 | 371 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 371 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3918 | 372 | mir_window_spec_set_width(spec, width); | 372 | mir_window_spec_set_width(spec, width); |
3919 | 373 | mir_window_spec_set_height(spec, height); | 373 | mir_window_spec_set_height(spec, height); |
3920 | 374 | mir_window_spec_set_pixel_format(spec, pixel_format); | 374 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3921 | @@ -397,7 +397,7 @@ | |||
3922 | 397 | 397 | ||
3923 | 398 | auto const surface = create_surface([&](MirWindowSpec* spec) | 398 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3924 | 399 | { | 399 | { |
3926 | 400 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 400 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3927 | 401 | mir_window_spec_set_width(spec, width); | 401 | mir_window_spec_set_width(spec, width); |
3928 | 402 | mir_window_spec_set_height(spec, height); | 402 | mir_window_spec_set_height(spec, height); |
3929 | 403 | mir_window_spec_set_pixel_format(spec, pixel_format); | 403 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3930 | @@ -427,7 +427,7 @@ | |||
3931 | 427 | 427 | ||
3932 | 428 | auto const surface = create_surface([&](MirWindowSpec* spec) | 428 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3933 | 429 | { | 429 | { |
3935 | 430 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 430 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3936 | 431 | mir_window_spec_set_width(spec, width); | 431 | mir_window_spec_set_width(spec, width); |
3937 | 432 | mir_window_spec_set_height(spec, height); | 432 | mir_window_spec_set_height(spec, height); |
3938 | 433 | mir_window_spec_set_pixel_format(spec, pixel_format); | 433 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3939 | @@ -457,7 +457,7 @@ | |||
3940 | 457 | 457 | ||
3941 | 458 | auto const surface = create_surface([&](MirWindowSpec* spec) | 458 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3942 | 459 | { | 459 | { |
3944 | 460 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 460 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3945 | 461 | mir_window_spec_set_width(spec, width); | 461 | mir_window_spec_set_width(spec, width); |
3946 | 462 | mir_window_spec_set_height(spec, height); | 462 | mir_window_spec_set_height(spec, height); |
3947 | 463 | mir_window_spec_set_pixel_format(spec, pixel_format); | 463 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3948 | @@ -494,7 +494,7 @@ | |||
3949 | 494 | 494 | ||
3950 | 495 | auto const surface = create_surface([&](MirWindowSpec* spec) | 495 | auto const surface = create_surface([&](MirWindowSpec* spec) |
3951 | 496 | { | 496 | { |
3953 | 497 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 497 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3954 | 498 | mir_window_spec_set_width(spec, width); | 498 | mir_window_spec_set_width(spec, width); |
3955 | 499 | mir_window_spec_set_height(spec, height); | 499 | mir_window_spec_set_height(spec, height); |
3956 | 500 | mir_window_spec_set_pixel_format(spec, pixel_format); | 500 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3957 | @@ -564,7 +564,7 @@ | |||
3958 | 564 | 564 | ||
3959 | 565 | auto const parent = create_surface([&](MirWindowSpec* spec) | 565 | auto const parent = create_surface([&](MirWindowSpec* spec) |
3960 | 566 | { | 566 | { |
3962 | 567 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 567 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3963 | 568 | mir_window_spec_set_width(spec, width); | 568 | mir_window_spec_set_width(spec, width); |
3964 | 569 | mir_window_spec_set_height(spec, height); | 569 | mir_window_spec_set_height(spec, height); |
3965 | 570 | mir_window_spec_set_pixel_format(spec, pixel_format); | 570 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3966 | @@ -590,7 +590,7 @@ | |||
3967 | 590 | 590 | ||
3968 | 591 | auto const parent = create_surface([&](MirWindowSpec* spec) | 591 | auto const parent = create_surface([&](MirWindowSpec* spec) |
3969 | 592 | { | 592 | { |
3971 | 593 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 593 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3972 | 594 | mir_window_spec_set_width(spec, width); | 594 | mir_window_spec_set_width(spec, width); |
3973 | 595 | mir_window_spec_set_height(spec, height); | 595 | mir_window_spec_set_height(spec, height); |
3974 | 596 | mir_window_spec_set_pixel_format(spec, pixel_format); | 596 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3975 | @@ -632,7 +632,7 @@ | |||
3976 | 632 | 632 | ||
3977 | 633 | auto const parent = create_surface([&](MirWindowSpec* spec) | 633 | auto const parent = create_surface([&](MirWindowSpec* spec) |
3978 | 634 | { | 634 | { |
3980 | 635 | mir_window_spec_set_type(spec, mir_surface_type_normal); | 635 | mir_window_spec_set_type(spec, mir_window_type_normal); |
3981 | 636 | mir_window_spec_set_width(spec, width); | 636 | mir_window_spec_set_width(spec, width); |
3982 | 637 | mir_window_spec_set_height(spec, height); | 637 | mir_window_spec_set_height(spec, height); |
3983 | 638 | mir_window_spec_set_pixel_format(spec, pixel_format); | 638 | mir_window_spec_set_pixel_format(spec, pixel_format); |
3984 | @@ -669,10 +669,10 @@ | |||
3985 | 669 | } | 669 | } |
3986 | 670 | 670 | ||
3987 | 671 | INSTANTIATE_TEST_CASE_P(SurfaceSpecification, SurfaceWithoutParent, | 671 | INSTANTIATE_TEST_CASE_P(SurfaceSpecification, SurfaceWithoutParent, |
3989 | 672 | Values(mir_surface_type_utility, mir_surface_type_normal)); | 672 | Values(mir_window_type_utility, mir_window_type_normal)); |
3990 | 673 | 673 | ||
3991 | 674 | INSTANTIATE_TEST_CASE_P(SurfaceSpecification, SurfaceNeedingParent, | 674 | INSTANTIATE_TEST_CASE_P(SurfaceSpecification, SurfaceNeedingParent, |
3993 | 675 | Values(mir_surface_type_satellite, mir_surface_type_gloss, mir_surface_type_tip)); | 675 | Values(mir_window_type_satellite, mir_window_type_gloss, mir_window_type_tip)); |
3994 | 676 | 676 | ||
3995 | 677 | INSTANTIATE_TEST_CASE_P(SurfaceSpecification, SurfaceMayHaveParent, | 677 | INSTANTIATE_TEST_CASE_P(SurfaceSpecification, SurfaceMayHaveParent, |
3997 | 678 | Values(mir_surface_type_dialog, mir_surface_type_freestyle)); | 678 | Values(mir_window_type_dialog, mir_window_type_freestyle)); |
3998 | 679 | 679 | ||
3999 | === modified file 'tests/acceptance-tests/test_system_compositor_window_manager.cpp' | |||
4000 | --- tests/acceptance-tests/test_system_compositor_window_manager.cpp 2017-01-09 06:48:47 +0000 | |||
4001 | +++ tests/acceptance-tests/test_system_compositor_window_manager.cpp 2017-01-10 20:52:04 +0000 | |||
4002 | @@ -174,14 +174,14 @@ | |||
4003 | 174 | 174 | ||
4004 | 175 | MATCHER_P(MirFocusEvent, expected, "") | 175 | MATCHER_P(MirFocusEvent, expected, "") |
4005 | 176 | { | 176 | { |
4007 | 177 | if (mir_event_get_type(arg) != mir_event_type_surface) | 177 | if (mir_event_get_type(arg) != mir_event_type_window) |
4008 | 178 | return false; | 178 | return false; |
4009 | 179 | 179 | ||
4013 | 180 | auto surface_event = mir_event_get_surface_event(arg); | 180 | auto window_event = mir_event_get_window_event(arg); |
4014 | 181 | auto attrib = mir_surface_event_get_attribute(surface_event); | 181 | auto attrib = mir_window_event_get_attribute(window_event); |
4015 | 182 | auto value = mir_surface_event_get_attribute_value(surface_event); | 182 | auto value = mir_window_event_get_attribute_value(window_event); |
4016 | 183 | 183 | ||
4018 | 184 | return (attrib == mir_surface_attrib_focus) | 184 | return (attrib == mir_window_attrib_focus) |
4019 | 185 | && (value == expected); | 185 | && (value == expected); |
4020 | 186 | } | 186 | } |
4021 | 187 | } | 187 | } |
4022 | 188 | 188 | ||
4023 | === modified file 'tests/acceptance-tests/throwback/test_shell_control_of_surface_configuration.cpp' | |||
4024 | --- tests/acceptance-tests/throwback/test_shell_control_of_surface_configuration.cpp 2017-01-09 06:48:47 +0000 | |||
4025 | +++ tests/acceptance-tests/throwback/test_shell_control_of_surface_configuration.cpp 2017-01-10 20:52:04 +0000 | |||
4026 | @@ -42,12 +42,12 @@ | |||
4027 | 42 | MOCK_METHOD4(set_surface_attribute, | 42 | MOCK_METHOD4(set_surface_attribute, |
4028 | 43 | int(std::shared_ptr<ms::Session> const& session, | 43 | int(std::shared_ptr<ms::Session> const& session, |
4029 | 44 | std::shared_ptr<ms::Surface> const& surface, | 44 | std::shared_ptr<ms::Surface> const& surface, |
4031 | 45 | MirSurfaceAttrib attrib, | 45 | MirWindowAttrib attrib, |
4032 | 46 | int value)); | 46 | int value)); |
4033 | 47 | 47 | ||
4034 | 48 | int real_set_surface_attribute(std::shared_ptr<ms::Session> const& session, | 48 | int real_set_surface_attribute(std::shared_ptr<ms::Session> const& session, |
4035 | 49 | std::shared_ptr<ms::Surface> const& surface, | 49 | std::shared_ptr<ms::Surface> const& surface, |
4037 | 50 | MirSurfaceAttrib attrib, | 50 | MirWindowAttrib attrib, |
4038 | 51 | int value) | 51 | int value) |
4039 | 52 | { | 52 | { |
4040 | 53 | return msh::CanonicalWindowManager::set_surface_attribute(session, surface, attrib, value); | 53 | return msh::CanonicalWindowManager::set_surface_attribute(session, surface, attrib, value); |
4041 | @@ -70,7 +70,7 @@ | |||
4042 | 70 | mock_window_manager.get(), &MockWindowManager::real_set_surface_attribute)); | 70 | mock_window_manager.get(), &MockWindowManager::real_set_surface_attribute)); |
4043 | 71 | 71 | ||
4044 | 72 | EXPECT_CALL(*mock_window_manager, | 72 | EXPECT_CALL(*mock_window_manager, |
4046 | 73 | set_surface_attribute(_, _, Ne(mir_surface_attrib_state), _)) | 73 | set_surface_attribute(_, _, Ne(mir_window_attrib_state), _)) |
4047 | 74 | .Times(AnyNumber()); | 74 | .Times(AnyNumber()); |
4048 | 75 | 75 | ||
4049 | 76 | return mock_window_manager; | 76 | return mock_window_manager; |
4050 | @@ -86,7 +86,7 @@ | |||
4051 | 86 | TEST_F(ShellSurfaceConfiguration, the_window_manager_is_notified_of_attribute_changes) | 86 | TEST_F(ShellSurfaceConfiguration, the_window_manager_is_notified_of_attribute_changes) |
4052 | 87 | { | 87 | { |
4053 | 88 | EXPECT_CALL(*mock_window_manager, | 88 | EXPECT_CALL(*mock_window_manager, |
4055 | 89 | set_surface_attribute(_, _, mir_surface_attrib_state, Eq(mir_surface_state_maximized))); | 89 | set_surface_attribute(_, _, mir_window_attrib_state, Eq(mir_surface_state_maximized))); |
4056 | 90 | 90 | ||
4057 | 91 | mir_wait_for(mir_surface_set_state(window, mir_surface_state_maximized)); | 91 | mir_wait_for(mir_surface_set_state(window, mir_surface_state_maximized)); |
4058 | 92 | 92 | ||
4059 | @@ -98,7 +98,7 @@ | |||
4060 | 98 | auto const set_to_vertmax = [this]( | 98 | auto const set_to_vertmax = [this]( |
4061 | 99 | std::shared_ptr<ms::Session> const& session, | 99 | std::shared_ptr<ms::Session> const& session, |
4062 | 100 | std::shared_ptr<ms::Surface> const& surface, | 100 | std::shared_ptr<ms::Surface> const& surface, |
4064 | 101 | MirSurfaceAttrib attrib, | 101 | MirWindowAttrib attrib, |
4065 | 102 | int /*value*/) | 102 | int /*value*/) |
4066 | 103 | { | 103 | { |
4067 | 104 | return mock_window_manager->real_set_surface_attribute( | 104 | return mock_window_manager->real_set_surface_attribute( |
4068 | @@ -106,7 +106,7 @@ | |||
4069 | 106 | }; | 106 | }; |
4070 | 107 | 107 | ||
4071 | 108 | EXPECT_CALL(*mock_window_manager, | 108 | EXPECT_CALL(*mock_window_manager, |
4073 | 109 | set_surface_attribute(_, _, mir_surface_attrib_state, Eq(mir_surface_state_maximized))) | 109 | set_surface_attribute(_, _, mir_window_attrib_state, Eq(mir_surface_state_maximized))) |
4074 | 110 | .WillOnce(Invoke(set_to_vertmax)); | 110 | .WillOnce(Invoke(set_to_vertmax)); |
4075 | 111 | 111 | ||
4076 | 112 | mir_wait_for(mir_surface_set_state(window, mir_surface_state_maximized)); | 112 | mir_wait_for(mir_surface_set_state(window, mir_surface_state_maximized)); |
4077 | 113 | 113 | ||
4078 | === modified file 'tests/include/mir/test/doubles/mock_egl_native_surface.h' | |||
4079 | --- tests/include/mir/test/doubles/mock_egl_native_surface.h 2017-01-09 06:48:47 +0000 | |||
4080 | +++ tests/include/mir/test/doubles/mock_egl_native_surface.h 2017-01-10 20:52:04 +0000 | |||
4081 | @@ -35,7 +35,7 @@ | |||
4082 | 35 | MOCK_CONST_METHOD0(get_parameters, MirWindowParameters()); | 35 | MOCK_CONST_METHOD0(get_parameters, MirWindowParameters()); |
4083 | 36 | MOCK_METHOD0(get_current_buffer, std::shared_ptr<client::ClientBuffer>()); | 36 | MOCK_METHOD0(get_current_buffer, std::shared_ptr<client::ClientBuffer>()); |
4084 | 37 | MOCK_METHOD0(swap_buffers_sync, void()); | 37 | MOCK_METHOD0(swap_buffers_sync, void()); |
4086 | 38 | MOCK_METHOD2(request_and_wait_for_configure, void(MirSurfaceAttrib,int)); | 38 | MOCK_METHOD2(request_and_wait_for_configure, void(MirWindowAttrib,int)); |
4087 | 39 | MOCK_METHOD1(set_buffer_cache_size, void(unsigned int)); | 39 | MOCK_METHOD1(set_buffer_cache_size, void(unsigned int)); |
4088 | 40 | }; | 40 | }; |
4089 | 41 | 41 | ||
4090 | 42 | 42 | ||
4091 | === modified file 'tests/include/mir/test/doubles/mock_frontend_surface.h' | |||
4092 | --- tests/include/mir/test/doubles/mock_frontend_surface.h 2015-06-18 02:46:16 +0000 | |||
4093 | +++ tests/include/mir/test/doubles/mock_frontend_surface.h 2017-01-10 20:52:04 +0000 | |||
4094 | @@ -63,9 +63,9 @@ | |||
4095 | 63 | MOCK_METHOD1(set_cursor_image, void(std::shared_ptr<graphics::CursorImage> const&)); | 63 | MOCK_METHOD1(set_cursor_image, void(std::shared_ptr<graphics::CursorImage> const&)); |
4096 | 64 | MOCK_METHOD2(set_cursor_stream, void(std::shared_ptr<frontend::BufferStream> const&, geometry::Displacement const&)); | 64 | MOCK_METHOD2(set_cursor_stream, void(std::shared_ptr<frontend::BufferStream> const&, geometry::Displacement const&)); |
4097 | 65 | 65 | ||
4099 | 66 | MOCK_METHOD2(configure, int(MirSurfaceAttrib, int)); | 66 | MOCK_METHOD2(configure, int(MirWindowAttrib, int)); |
4100 | 67 | 67 | ||
4102 | 68 | MOCK_CONST_METHOD1(query, int(MirSurfaceAttrib)); | 68 | MOCK_CONST_METHOD1(query, int(MirWindowAttrib)); |
4103 | 69 | 69 | ||
4104 | 70 | MOCK_METHOD1(add_observer, void(std::shared_ptr<scene::SurfaceObserver> const&)); | 70 | MOCK_METHOD1(add_observer, void(std::shared_ptr<scene::SurfaceObserver> const&)); |
4105 | 71 | MOCK_METHOD1(remove_observer, void(std::weak_ptr<scene::SurfaceObserver> const&)); | 71 | MOCK_METHOD1(remove_observer, void(std::weak_ptr<scene::SurfaceObserver> const&)); |
4106 | 72 | 72 | ||
4107 | === modified file 'tests/include/mir/test/doubles/mock_scene_session.h' | |||
4108 | --- tests/include/mir/test/doubles/mock_scene_session.h 2016-09-29 03:56:21 +0000 | |||
4109 | +++ tests/include/mir/test/doubles/mock_scene_session.h 2017-01-10 20:52:04 +0000 | |||
4110 | @@ -59,7 +59,7 @@ | |||
4111 | 59 | MOCK_METHOD1(send_display_config, void(graphics::DisplayConfiguration const&)); | 59 | MOCK_METHOD1(send_display_config, void(graphics::DisplayConfiguration const&)); |
4112 | 60 | MOCK_METHOD1(send_error, void(ClientVisibleError const&)); | 60 | MOCK_METHOD1(send_error, void(ClientVisibleError const&)); |
4113 | 61 | MOCK_METHOD1(send_input_device_change, void(std::vector<std::shared_ptr<mir::input::Device>> const&)); | 61 | MOCK_METHOD1(send_input_device_change, void(std::vector<std::shared_ptr<mir::input::Device>> const&)); |
4115 | 62 | MOCK_METHOD3(configure_surface, int(frontend::SurfaceId, MirSurfaceAttrib, int)); | 62 | MOCK_METHOD3(configure_surface, int(frontend::SurfaceId, MirWindowAttrib, int)); |
4116 | 63 | 63 | ||
4117 | 64 | MOCK_METHOD1(set_lifecycle_state, void(MirLifecycleState state)); | 64 | MOCK_METHOD1(set_lifecycle_state, void(MirLifecycleState state)); |
4118 | 65 | 65 | ||
4119 | 66 | 66 | ||
4120 | === modified file 'tests/include/mir/test/doubles/mock_shell.h' | |||
4121 | --- tests/include/mir/test/doubles/mock_shell.h 2016-01-29 08:18:22 +0000 | |||
4122 | +++ tests/include/mir/test/doubles/mock_shell.h 2017-01-10 20:52:04 +0000 | |||
4123 | @@ -65,10 +65,10 @@ | |||
4124 | 65 | 65 | ||
4125 | 66 | MOCK_METHOD4(set_surface_attribute, int( | 66 | MOCK_METHOD4(set_surface_attribute, int( |
4126 | 67 | std::shared_ptr<frontend::Session> const& session, frontend::SurfaceId surface_id, | 67 | std::shared_ptr<frontend::Session> const& session, frontend::SurfaceId surface_id, |
4128 | 68 | MirSurfaceAttrib attrib, int value)); | 68 | MirWindowAttrib attrib, int value)); |
4129 | 69 | 69 | ||
4130 | 70 | MOCK_METHOD3(get_surface_attribute, int(std::shared_ptr<frontend::Session> const& session, | 70 | MOCK_METHOD3(get_surface_attribute, int(std::shared_ptr<frontend::Session> const& session, |
4132 | 71 | frontend::SurfaceId surface_id, MirSurfaceAttrib attrib)); | 71 | frontend::SurfaceId surface_id, MirWindowAttrib attrib)); |
4133 | 72 | 72 | ||
4134 | 73 | MOCK_METHOD3(raise_surface, void(std::shared_ptr<frontend::Session> const& session, | 73 | MOCK_METHOD3(raise_surface, void(std::shared_ptr<frontend::Session> const& session, |
4135 | 74 | frontend::SurfaceId surface_id, uint64_t timestamp)); | 74 | frontend::SurfaceId surface_id, uint64_t timestamp)); |
4136 | 75 | 75 | ||
4137 | === modified file 'tests/include/mir/test/doubles/mock_surface.h' | |||
4138 | --- tests/include/mir/test/doubles/mock_surface.h 2016-08-25 08:16:10 +0000 | |||
4139 | +++ tests/include/mir/test/doubles/mock_surface.h 2017-01-10 20:52:04 +0000 | |||
4140 | @@ -69,7 +69,7 @@ | |||
4141 | 69 | MOCK_CONST_METHOD0(supports_input, bool()); | 69 | MOCK_CONST_METHOD0(supports_input, bool()); |
4142 | 70 | MOCK_CONST_METHOD0(client_input_fd, int()); | 70 | MOCK_CONST_METHOD0(client_input_fd, int()); |
4143 | 71 | 71 | ||
4145 | 72 | MOCK_METHOD2(configure, int(MirSurfaceAttrib, int)); | 72 | MOCK_METHOD2(configure, int(MirWindowAttrib, int)); |
4146 | 73 | MOCK_METHOD1(add_observer, void(std::shared_ptr<scene::SurfaceObserver> const&)); | 73 | MOCK_METHOD1(add_observer, void(std::shared_ptr<scene::SurfaceObserver> const&)); |
4147 | 74 | MOCK_METHOD1(remove_observer, void(std::weak_ptr<scene::SurfaceObserver> const&)); | 74 | MOCK_METHOD1(remove_observer, void(std::weak_ptr<scene::SurfaceObserver> const&)); |
4148 | 75 | MOCK_METHOD1(consume, void(MirEvent const*)); | 75 | MOCK_METHOD1(consume, void(MirEvent const*)); |
4149 | 76 | 76 | ||
4150 | === modified file 'tests/include/mir/test/doubles/stub_scene_surface.h' | |||
4151 | --- tests/include/mir/test/doubles/stub_scene_surface.h 2016-10-31 02:37:31 +0000 | |||
4152 | +++ tests/include/mir/test/doubles/stub_scene_surface.h 2017-01-10 20:52:04 +0000 | |||
4153 | @@ -67,7 +67,7 @@ | |||
4154 | 67 | int buffers_ready_for_compositor(void const*) const override { return 0; } | 67 | int buffers_ready_for_compositor(void const*) const override { return 0; } |
4155 | 68 | 68 | ||
4156 | 69 | float alpha() const override { return 0.0f;} | 69 | float alpha() const override { return 0.0f;} |
4158 | 70 | MirSurfaceType type() const override { return mir_surface_type_normal; } | 70 | MirWindowType type() const override { return mir_window_type_normal; } |
4159 | 71 | MirSurfaceState state() const override { return mir_surface_state_unknown; } | 71 | MirSurfaceState state() const override { return mir_surface_state_unknown; } |
4160 | 72 | 72 | ||
4161 | 73 | void hide() override {} | 73 | void hide() override {} |
4162 | @@ -93,8 +93,8 @@ | |||
4163 | 93 | 93 | ||
4164 | 94 | bool supports_input() const override { return true;} | 94 | bool supports_input() const override { return true;} |
4165 | 95 | int client_input_fd() const override { return fd;} | 95 | int client_input_fd() const override { return fd;} |
4168 | 96 | int configure(MirSurfaceAttrib, int) override { return 0; } | 96 | int configure(MirWindowAttrib, int) override { return 0; } |
4169 | 97 | int query(MirSurfaceAttrib) const override { return 0; } | 97 | int query(MirWindowAttrib) const override { return 0; } |
4170 | 98 | void with_most_recent_buffer_do(std::function<void(graphics::Buffer&)> const&) {} | 98 | void with_most_recent_buffer_do(std::function<void(graphics::Buffer&)> const&) {} |
4171 | 99 | 99 | ||
4172 | 100 | std::shared_ptr<mir::scene::Surface> parent() const override { return nullptr; } | 100 | std::shared_ptr<mir::scene::Surface> parent() const override { return nullptr; } |
4173 | 101 | 101 | ||
4174 | === modified file 'tests/integration-tests/client/test_mirsurface.cpp' | |||
4175 | --- tests/integration-tests/client/test_mirsurface.cpp 2017-01-09 06:48:47 +0000 | |||
4176 | +++ tests/integration-tests/client/test_mirsurface.cpp 2017-01-10 20:52:04 +0000 | |||
4177 | @@ -80,17 +80,17 @@ | |||
4178 | 80 | 80 | ||
4179 | 81 | MATCHER(IsAMenu, "") | 81 | MATCHER(IsAMenu, "") |
4180 | 82 | { | 82 | { |
4182 | 83 | return arg.type == mir_surface_type_menu; | 83 | return arg.type == mir_window_type_menu; |
4183 | 84 | } | 84 | } |
4184 | 85 | 85 | ||
4185 | 86 | MATCHER(IsATooltip, "") | 86 | MATCHER(IsATooltip, "") |
4186 | 87 | { | 87 | { |
4188 | 88 | return arg.type == mir_surface_type_tip; | 88 | return arg.type == mir_window_type_tip; |
4189 | 89 | } | 89 | } |
4190 | 90 | 90 | ||
4191 | 91 | MATCHER(IsADialog, "") | 91 | MATCHER(IsADialog, "") |
4192 | 92 | { | 92 | { |
4194 | 93 | return arg.type == mir_surface_type_dialog; | 93 | return arg.type == mir_window_type_dialog; |
4195 | 94 | } | 94 | } |
4196 | 95 | 95 | ||
4197 | 96 | MATCHER_P(HasParent, parent, "") | 96 | MATCHER_P(HasParent, parent, "") |
4198 | @@ -143,7 +143,7 @@ | |||
4199 | 143 | spec.buffer_usage = mir_buffer_usage_software; | 143 | spec.buffer_usage = mir_buffer_usage_software; |
4200 | 144 | spec.surface_name = "test_surface"; | 144 | spec.surface_name = "test_surface"; |
4201 | 145 | spec.output_id = mir_display_output_id_invalid; | 145 | spec.output_id = mir_display_output_id_invalid; |
4203 | 146 | spec.type = mir_surface_type_dialog; | 146 | spec.type = mir_window_type_dialog; |
4204 | 147 | spec.state = mir_surface_state_minimized; | 147 | spec.state = mir_surface_state_minimized; |
4205 | 148 | spec.pref_orientation = mir_orientation_mode_landscape; | 148 | spec.pref_orientation = mir_orientation_mode_landscape; |
4206 | 149 | } | 149 | } |
4207 | 150 | 150 | ||
4208 | === modified file 'tests/integration-tests/session_management.cpp' | |||
4209 | --- tests/integration-tests/session_management.cpp 2016-05-27 07:54:00 +0000 | |||
4210 | +++ tests/integration-tests/session_management.cpp 2017-01-10 20:52:04 +0000 | |||
4211 | @@ -131,7 +131,7 @@ | |||
4212 | 131 | mir::geometry::Size{1,1}, mir_pixel_format_abgr_8888, mir::graphics::BufferUsage::software); | 131 | mir::geometry::Size{1,1}, mir_pixel_format_abgr_8888, mir::graphics::BufferUsage::software); |
4213 | 132 | ms::SurfaceCreationParameters const params = ms::SurfaceCreationParameters() | 132 | ms::SurfaceCreationParameters const params = ms::SurfaceCreationParameters() |
4214 | 133 | .of_size(100,100) | 133 | .of_size(100,100) |
4216 | 134 | .of_type(mir_surface_type_normal) | 134 | .of_type(mir_window_type_normal) |
4217 | 135 | .with_buffer_stream(session->create_buffer_stream(properties)); | 135 | .with_buffer_stream(session->create_buffer_stream(properties)); |
4218 | 136 | 136 | ||
4219 | 137 | EXPECT_CALL(*test_surface_stack, add_surface(_,_)).Times(1); | 137 | EXPECT_CALL(*test_surface_stack, add_surface(_,_)).Times(1); |
4220 | 138 | 138 | ||
4221 | === modified file 'tests/integration-tests/test_session.cpp' | |||
4222 | --- tests/integration-tests/test_session.cpp 2016-11-04 17:12:59 +0000 | |||
4223 | +++ tests/integration-tests/test_session.cpp 2017-01-10 20:52:04 +0000 | |||
4224 | @@ -117,7 +117,7 @@ | |||
4225 | 117 | auto compositor = conf.the_compositor(); | 117 | auto compositor = conf.the_compositor(); |
4226 | 118 | 118 | ||
4227 | 119 | compositor->start(); | 119 | compositor->start(); |
4229 | 120 | session.default_surface()->configure(mir_surface_attrib_swapinterval, 0); | 120 | session.default_surface()->configure(mir_window_attrib_swapinterval, 0); |
4230 | 121 | 121 | ||
4231 | 122 | std::thread client_thread{ | 122 | std::thread client_thread{ |
4232 | 123 | [&session, stream_id] | 123 | [&session, stream_id] |
4233 | 124 | 124 | ||
4234 | === modified file 'tests/mir_test_framework/stub_surface.cpp' | |||
4235 | --- tests/mir_test_framework/stub_surface.cpp 2016-10-31 02:37:31 +0000 | |||
4236 | +++ tests/mir_test_framework/stub_surface.cpp 2017-01-10 20:52:04 +0000 | |||
4237 | @@ -131,9 +131,9 @@ | |||
4238 | 131 | return 0; | 131 | return 0; |
4239 | 132 | } | 132 | } |
4240 | 133 | 133 | ||
4242 | 134 | MirSurfaceType mtd::StubSurface::type() const | 134 | MirWindowType mtd::StubSurface::type() const |
4243 | 135 | { | 135 | { |
4245 | 136 | return MirSurfaceType::mir_surface_type_normal; | 136 | return MirWindowType::mir_window_type_normal; |
4246 | 137 | } | 137 | } |
4247 | 138 | 138 | ||
4248 | 139 | MirSurfaceState mtd::StubSurface::state() const | 139 | MirSurfaceState mtd::StubSurface::state() const |
4249 | @@ -141,12 +141,12 @@ | |||
4250 | 141 | return MirSurfaceState::mir_surface_state_fullscreen; | 141 | return MirSurfaceState::mir_surface_state_fullscreen; |
4251 | 142 | } | 142 | } |
4252 | 143 | 143 | ||
4254 | 144 | int mtd::StubSurface::configure(MirSurfaceAttrib /*attrib*/, int value) | 144 | int mtd::StubSurface::configure(MirWindowAttrib /*attrib*/, int value) |
4255 | 145 | { | 145 | { |
4256 | 146 | return value; | 146 | return value; |
4257 | 147 | } | 147 | } |
4258 | 148 | 148 | ||
4260 | 149 | int mtd::StubSurface::query(MirSurfaceAttrib /*attrib*/) const | 149 | int mtd::StubSurface::query(MirWindowAttrib /*attrib*/) const |
4261 | 150 | { | 150 | { |
4262 | 151 | return 0; | 151 | return 0; |
4263 | 152 | } | 152 | } |
4264 | 153 | 153 | ||
4265 | === modified file 'tests/mir_test_framework/visible_surface.cpp' | |||
4266 | --- tests/mir_test_framework/visible_surface.cpp 2017-01-09 06:48:47 +0000 | |||
4267 | +++ tests/mir_test_framework/visible_surface.cpp 2017-01-10 20:52:04 +0000 | |||
4268 | @@ -42,12 +42,13 @@ | |||
4269 | 42 | 42 | ||
4270 | 43 | void mtf::VisibleSurface::event_callback(MirSurface* surf, MirEvent const* ev, void* context) | 43 | void mtf::VisibleSurface::event_callback(MirSurface* surf, MirEvent const* ev, void* context) |
4271 | 44 | { | 44 | { |
4273 | 45 | if (mir_event_get_type(ev) == mir_event_type_surface) | 45 | if (mir_event_get_type(ev) == mir_event_type_window) |
4274 | 46 | { | 46 | { |
4276 | 47 | if (mir_surface_event_get_attribute(mir_event_get_surface_event(ev)) == mir_surface_attrib_visibility) | 47 | auto attrib = mir_window_event_get_attribute(mir_event_get_window_event(ev)); |
4277 | 48 | if (attrib == mir_window_attrib_visibility) | ||
4278 | 48 | { | 49 | { |
4279 | 49 | auto ctx = reinterpret_cast<VisibleSurface*>(context); | 50 | auto ctx = reinterpret_cast<VisibleSurface*>(context); |
4281 | 50 | ctx->set_visibility(surf, mir_surface_event_get_attribute_value(mir_event_get_surface_event(ev))); | 51 | ctx->set_visibility(surf, mir_window_event_get_attribute_value(mir_event_get_window_event(ev))); |
4282 | 51 | } | 52 | } |
4283 | 52 | } | 53 | } |
4284 | 53 | } | 54 | } |
4285 | 54 | 55 | ||
4286 | === modified file 'tests/unit-tests/client/test_client_mir_surface.cpp' | |||
4287 | --- tests/unit-tests/client/test_client_mir_surface.cpp 2017-01-09 06:48:47 +0000 | |||
4288 | +++ tests/unit-tests/client/test_client_mir_surface.cpp 2017-01-10 20:52:04 +0000 | |||
4289 | @@ -210,13 +210,13 @@ | |||
4290 | 210 | }; | 210 | }; |
4291 | 211 | 211 | ||
4292 | 212 | std::map<int, int> MockServerPackageGenerator::sent_surface_attributes = { | 212 | std::map<int, int> MockServerPackageGenerator::sent_surface_attributes = { |
4300 | 213 | { mir_surface_attrib_type, mir_surface_type_normal }, | 213 | { mir_window_attrib_type, mir_window_type_normal }, |
4301 | 214 | { mir_surface_attrib_state, mir_surface_state_restored }, | 214 | { mir_window_attrib_state, mir_surface_state_restored }, |
4302 | 215 | { mir_surface_attrib_swapinterval, 1 }, | 215 | { mir_window_attrib_swapinterval, 1 }, |
4303 | 216 | { mir_surface_attrib_focus, mir_surface_focused }, | 216 | { mir_window_attrib_focus, mir_surface_focused }, |
4304 | 217 | { mir_surface_attrib_dpi, 19 }, | 217 | { mir_window_attrib_dpi, 19 }, |
4305 | 218 | { mir_surface_attrib_visibility, mir_surface_visibility_exposed }, | 218 | { mir_window_attrib_visibility, mir_surface_visibility_exposed }, |
4306 | 219 | { mir_surface_attrib_preferred_orientation, mir_orientation_mode_any } | 219 | { mir_window_attrib_preferred_orientation, mir_orientation_mode_any } |
4307 | 220 | }; | 220 | }; |
4308 | 221 | 221 | ||
4309 | 222 | struct StubClientInputPlatform : public mircv::InputPlatform | 222 | struct StubClientInputPlatform : public mircv::InputPlatform |
4310 | @@ -389,9 +389,9 @@ | |||
4311 | 389 | 389 | ||
4312 | 390 | auto surface = create_and_wait_for_surface_with(*client_comm_channel); | 390 | auto surface = create_and_wait_for_surface_with(*client_comm_channel); |
4313 | 391 | 391 | ||
4315 | 392 | for (int i = 0; i < mir_surface_attribs; i++) | 392 | for (int i = 0; i < mir_window_attribs; i++) |
4316 | 393 | { | 393 | { |
4318 | 394 | EXPECT_EQ(MockServerPackageGenerator::sent_surface_attributes[i], surface->attrib(static_cast<MirSurfaceAttrib>(i))); | 394 | EXPECT_EQ(MockServerPackageGenerator::sent_surface_attributes[i], surface->attrib(static_cast<MirWindowAttrib>(i))); |
4319 | 395 | } | 395 | } |
4320 | 396 | } | 396 | } |
4321 | 397 | 397 | ||
4322 | @@ -492,7 +492,7 @@ | |||
4323 | 492 | 492 | ||
4324 | 493 | auto const surface = create_surface_with(unresponsive_server); | 493 | auto const surface = create_surface_with(unresponsive_server); |
4325 | 494 | 494 | ||
4327 | 495 | auto configure_wait_handle = surface->configure(mir_surface_attrib_dpi, 100); | 495 | auto configure_wait_handle = surface->configure(mir_window_attrib_dpi, 100); |
4328 | 496 | 496 | ||
4329 | 497 | auto expected_end = std::chrono::steady_clock::now() + pause_time; | 497 | auto expected_end = std::chrono::steady_clock::now() + pause_time; |
4330 | 498 | configure_wait_handle->wait_for_pending(pause_time); | 498 | configure_wait_handle->wait_for_pending(pause_time); |
4331 | 499 | 499 | ||
4332 | === modified file 'tests/unit-tests/frontend/test_event_sender.cpp' | |||
4333 | --- tests/unit-tests/frontend/test_event_sender.cpp 2016-12-20 15:01:43 +0000 | |||
4334 | +++ tests/unit-tests/frontend/test_event_sender.cpp 2017-01-10 20:52:04 +0000 | |||
4335 | @@ -156,7 +156,7 @@ | |||
4336 | 156 | { | 156 | { |
4337 | 157 | using namespace testing; | 157 | using namespace testing; |
4338 | 158 | 158 | ||
4340 | 159 | auto surface_ev = mev::make_event(mf::SurfaceId{1}, mir_surface_attrib_focus, mir_surface_focused); | 159 | auto surface_ev = mev::make_event(mf::SurfaceId{1}, mir_window_attrib_focus, mir_surface_focused); |
4341 | 160 | auto resize_ev = mev::make_event(mf::SurfaceId{1}, {10, 10}); | 160 | auto resize_ev = mev::make_event(mf::SurfaceId{1}, {10, 10}); |
4342 | 161 | 161 | ||
4343 | 162 | EXPECT_CALL(mock_msg_sender, send(_, _, _)) | 162 | EXPECT_CALL(mock_msg_sender, send(_, _, _)) |
4344 | 163 | 163 | ||
4345 | === modified file 'tests/unit-tests/platforms/android/client/test_egl_native_surface_interpreter.cpp' | |||
4346 | --- tests/unit-tests/platforms/android/client/test_egl_native_surface_interpreter.cpp 2017-01-09 06:48:47 +0000 | |||
4347 | +++ tests/unit-tests/platforms/android/client/test_egl_native_surface_interpreter.cpp 2017-01-10 20:52:04 +0000 | |||
4348 | @@ -57,7 +57,7 @@ | |||
4349 | 57 | MOCK_CONST_METHOD0(get_parameters, MirWindowParameters()); | 57 | MOCK_CONST_METHOD0(get_parameters, MirWindowParameters()); |
4350 | 58 | MOCK_METHOD0(get_current_buffer, std::shared_ptr<mcl::ClientBuffer>()); | 58 | MOCK_METHOD0(get_current_buffer, std::shared_ptr<mcl::ClientBuffer>()); |
4351 | 59 | MOCK_METHOD0(swap_buffers_sync, void()); | 59 | MOCK_METHOD0(swap_buffers_sync, void()); |
4353 | 60 | MOCK_METHOD2(request_and_wait_for_configure, void(MirSurfaceAttrib, int)); | 60 | MOCK_METHOD2(request_and_wait_for_configure, void(MirWindowAttrib, int)); |
4354 | 61 | MOCK_METHOD1(set_buffer_cache_size, void(unsigned int)); | 61 | MOCK_METHOD1(set_buffer_cache_size, void(unsigned int)); |
4355 | 62 | MirWindowParameters params; | 62 | MirWindowParameters params; |
4356 | 63 | std::shared_ptr<mtd::MockClientBuffer> client_buffer; | 63 | std::shared_ptr<mtd::MockClientBuffer> client_buffer; |
4357 | @@ -223,8 +223,8 @@ | |||
4358 | 223 | { | 223 | { |
4359 | 224 | testing::NiceMock<MockMirSurface> mock_surface{surf_params}; | 224 | testing::NiceMock<MockMirSurface> mock_surface{surf_params}; |
4360 | 225 | testing::InSequence seq; | 225 | testing::InSequence seq; |
4363 | 226 | EXPECT_CALL(mock_surface, request_and_wait_for_configure(mir_surface_attrib_swapinterval, 1)); | 226 | EXPECT_CALL(mock_surface, request_and_wait_for_configure(mir_window_attrib_swapinterval, 1)); |
4364 | 227 | EXPECT_CALL(mock_surface, request_and_wait_for_configure(mir_surface_attrib_swapinterval, 0)); | 227 | EXPECT_CALL(mock_surface, request_and_wait_for_configure(mir_window_attrib_swapinterval, 0)); |
4365 | 228 | 228 | ||
4366 | 229 | mcla::EGLNativeSurfaceInterpreter interpreter(mock_surface); | 229 | mcla::EGLNativeSurfaceInterpreter interpreter(mock_surface); |
4367 | 230 | interpreter.sync_to_display(true); | 230 | interpreter.sync_to_display(true); |
4368 | 231 | 231 | ||
4369 | === modified file 'tests/unit-tests/platforms/mesa/client/test_native_surface.cpp' | |||
4370 | --- tests/unit-tests/platforms/mesa/client/test_native_surface.cpp 2017-01-09 06:48:47 +0000 | |||
4371 | +++ tests/unit-tests/platforms/mesa/client/test_native_surface.cpp 2017-01-10 20:52:04 +0000 | |||
4372 | @@ -105,9 +105,9 @@ | |||
4373 | 105 | using namespace testing; | 105 | using namespace testing; |
4374 | 106 | 106 | ||
4375 | 107 | Sequence seq; | 107 | Sequence seq; |
4377 | 108 | EXPECT_CALL(mock_surface, request_and_wait_for_configure(mir_surface_attrib_swapinterval,0)) | 108 | EXPECT_CALL(mock_surface, request_and_wait_for_configure(mir_window_attrib_swapinterval,0)) |
4378 | 109 | .InSequence(seq); | 109 | .InSequence(seq); |
4380 | 110 | EXPECT_CALL(mock_surface, request_and_wait_for_configure(mir_surface_attrib_swapinterval,1)) | 110 | EXPECT_CALL(mock_surface, request_and_wait_for_configure(mir_window_attrib_swapinterval,1)) |
4381 | 111 | .InSequence(seq); | 111 | .InSequence(seq); |
4382 | 112 | 112 | ||
4383 | 113 | EXPECT_EQ(MIR_MESA_TRUE, native_surface.set_swapinterval(0)); | 113 | EXPECT_EQ(MIR_MESA_TRUE, native_surface.set_swapinterval(0)); |
4384 | 114 | 114 | ||
4385 | === modified file 'tests/unit-tests/scene/test_abstract_shell.cpp' | |||
4386 | --- tests/unit-tests/scene/test_abstract_shell.cpp 2016-11-09 02:30:14 +0000 | |||
4387 | +++ tests/unit-tests/scene/test_abstract_shell.cpp 2017-01-10 20:52:04 +0000 | |||
4388 | @@ -384,13 +384,13 @@ | |||
4389 | 384 | 384 | ||
4390 | 385 | MirSurfaceState const state{mir_surface_state_fullscreen}; | 385 | MirSurfaceState const state{mir_surface_state_fullscreen}; |
4391 | 386 | 386 | ||
4393 | 387 | EXPECT_CALL(*wm, set_surface_attribute(session, surface, mir_surface_attrib_state, state)) | 387 | EXPECT_CALL(*wm, set_surface_attribute(session, surface, mir_window_attrib_state, state)) |
4394 | 388 | .WillOnce(WithArg<1>(Invoke([](std::shared_ptr<ms::Surface> const& surface) | 388 | .WillOnce(WithArg<1>(Invoke([](std::shared_ptr<ms::Surface> const& surface) |
4400 | 389 | { surface->configure(mir_surface_attrib_state, mir_surface_state_maximized); return mir_surface_state_maximized; }))); | 389 | { surface->configure(mir_window_attrib_state, mir_surface_state_maximized); return mir_surface_state_maximized; }))); |
4401 | 390 | 390 | ||
4402 | 391 | EXPECT_CALL(mock_surface, configure(mir_surface_attrib_state, mir_surface_state_maximized)); | 391 | EXPECT_CALL(mock_surface, configure(mir_window_attrib_state, mir_surface_state_maximized)); |
4403 | 392 | 392 | ||
4404 | 393 | shell.set_surface_attribute(session, surface, mir_surface_attrib_state, mir_surface_state_fullscreen); | 393 | shell.set_surface_attribute(session, surface, mir_window_attrib_state, mir_surface_state_fullscreen); |
4405 | 394 | } | 394 | } |
4406 | 395 | 395 | ||
4407 | 396 | TEST_F(AbstractShell, as_focus_controller_set_focus_to_notifies_session_event_sink) | 396 | TEST_F(AbstractShell, as_focus_controller_set_focus_to_notifies_session_event_sink) |
4408 | 397 | 397 | ||
4409 | === modified file 'tests/unit-tests/scene/test_application_session.cpp' | |||
4410 | --- tests/unit-tests/scene/test_application_session.cpp 2016-11-11 07:56:09 +0000 | |||
4411 | +++ tests/unit-tests/scene/test_application_session.cpp 2017-01-10 20:52:04 +0000 | |||
4412 | @@ -114,7 +114,7 @@ | |||
4413 | 114 | 114 | ||
4414 | 115 | MATCHER(IsSurfaceOutputEvent, "") | 115 | MATCHER(IsSurfaceOutputEvent, "") |
4415 | 116 | { | 116 | { |
4417 | 117 | return mir_event_get_type(&arg) == mir_event_type_surface_output; | 117 | return mir_event_get_type(&arg) == mir_event_type_window_output; |
4418 | 118 | } | 118 | } |
4419 | 119 | 119 | ||
4420 | 120 | struct StubSurfaceStack : public msh::SurfaceStack | 120 | struct StubSurfaceStack : public msh::SurfaceStack |
4421 | @@ -696,7 +696,7 @@ | |||
4422 | 696 | 696 | ||
4423 | 697 | ms::SurfaceCreationParameters params = ms::SurfaceCreationParameters{} | 697 | ms::SurfaceCreationParameters params = ms::SurfaceCreationParameters{} |
4424 | 698 | .of_name("Aardavks") | 698 | .of_name("Aardavks") |
4426 | 699 | .of_type(mir_surface_type_normal) | 699 | .of_type(mir_window_type_normal) |
4427 | 700 | .with_buffer_stream(id); | 700 | .with_buffer_stream(id); |
4428 | 701 | 701 | ||
4429 | 702 | session->create_surface(params, event_sink); | 702 | session->create_surface(params, event_sink); |
4430 | @@ -895,13 +895,13 @@ | |||
4431 | 895 | { | 895 | { |
4432 | 896 | using namespace testing; | 896 | using namespace testing; |
4433 | 897 | 897 | ||
4435 | 898 | if (mir_event_get_type(arg) != mir_event_type_surface_output) | 898 | if (mir_event_get_type(arg) != mir_event_type_window_output) |
4436 | 899 | { | 899 | { |
4438 | 900 | *result_listener << "Event is not a MirSurfaceOutputEvent"; | 900 | *result_listener << "Event is not a MirWindowOutputEvent"; |
4439 | 901 | return 0; | 901 | return 0; |
4440 | 902 | } | 902 | } |
4441 | 903 | 903 | ||
4443 | 904 | auto const event = mir_event_get_surface_output_event(arg); | 904 | auto const event = mir_event_get_window_output_event(arg); |
4444 | 905 | 905 | ||
4445 | 906 | if (output.output.current_mode_index >= output.output.modes.size()) | 906 | if (output.output.current_mode_index >= output.output.modes.size()) |
4446 | 907 | return false; | 907 | return false; |
4447 | @@ -911,23 +911,23 @@ | |||
4448 | 911 | return | 911 | return |
4449 | 912 | ExplainMatchResult( | 912 | ExplainMatchResult( |
4450 | 913 | Eq(output.dpi), | 913 | Eq(output.dpi), |
4452 | 914 | mir_surface_output_event_get_dpi(event), | 914 | mir_window_output_event_get_dpi(event), |
4453 | 915 | result_listener) && | 915 | result_listener) && |
4454 | 916 | ExplainMatchResult( | 916 | ExplainMatchResult( |
4455 | 917 | Eq(output.form_factor), | 917 | Eq(output.form_factor), |
4457 | 918 | mir_surface_output_event_get_form_factor(event), | 918 | mir_window_output_event_get_form_factor(event), |
4458 | 919 | result_listener) && | 919 | result_listener) && |
4459 | 920 | ExplainMatchResult( | 920 | ExplainMatchResult( |
4460 | 921 | Eq(output.scale), | 921 | Eq(output.scale), |
4462 | 922 | mir_surface_output_event_get_scale(event), | 922 | mir_window_output_event_get_scale(event), |
4463 | 923 | result_listener) && | 923 | result_listener) && |
4464 | 924 | ExplainMatchResult( | 924 | ExplainMatchResult( |
4465 | 925 | Eq(mode.vrefresh_hz), | 925 | Eq(mode.vrefresh_hz), |
4467 | 926 | mir_surface_output_event_get_refresh_rate(event), | 926 | mir_window_output_event_get_refresh_rate(event), |
4468 | 927 | result_listener) && | 927 | result_listener) && |
4469 | 928 | ExplainMatchResult( | 928 | ExplainMatchResult( |
4470 | 929 | Eq(output.id), | 929 | Eq(output.id), |
4472 | 930 | mir_surface_output_event_get_output_id(event), | 930 | mir_window_output_event_get_output_id(event), |
4473 | 931 | result_listener); | 931 | result_listener); |
4474 | 932 | } | 932 | } |
4475 | 933 | } | 933 | } |
4476 | @@ -942,7 +942,7 @@ | |||
4477 | 942 | EXPECT_CALL(*sender, handle_event(IsSurfaceOutputEvent())) | 942 | EXPECT_CALL(*sender, handle_event(IsSurfaceOutputEvent())) |
4478 | 943 | .WillOnce(Invoke([&event, &event_received](MirEvent const& ev) | 943 | .WillOnce(Invoke([&event, &event_received](MirEvent const& ev) |
4479 | 944 | { | 944 | { |
4481 | 945 | if (event.type() == mir_event_type_surface_output) | 945 | if (event.type() == mir_event_type_window_output) |
4482 | 946 | { | 946 | { |
4483 | 947 | event = *ev.to_surface_output(); | 947 | event = *ev.to_surface_output(); |
4484 | 948 | } | 948 | } |
4485 | @@ -978,7 +978,7 @@ | |||
4486 | 978 | ON_CALL(*sender, handle_event(IsSurfaceOutputEvent())) | 978 | ON_CALL(*sender, handle_event(IsSurfaceOutputEvent())) |
4487 | 979 | .WillByDefault(Invoke([&event, &events_received](MirEvent const& ev) | 979 | .WillByDefault(Invoke([&event, &events_received](MirEvent const& ev) |
4488 | 980 | { | 980 | { |
4490 | 981 | if (ev.type() == mir_event_type_surface_output) | 981 | if (ev.type() == mir_event_type_window_output) |
4491 | 982 | { | 982 | { |
4492 | 983 | event[events_received] = *ev.to_surface_output(); | 983 | event[events_received] = *ev.to_surface_output(); |
4493 | 984 | } | 984 | } |
4494 | @@ -1035,7 +1035,7 @@ | |||
4495 | 1035 | ON_CALL(*sender, handle_event(IsSurfaceOutputEvent())) | 1035 | ON_CALL(*sender, handle_event(IsSurfaceOutputEvent())) |
4496 | 1036 | .WillByDefault(Invoke([&event, &event_received](MirEvent const& ev) | 1036 | .WillByDefault(Invoke([&event, &event_received](MirEvent const& ev) |
4497 | 1037 | { | 1037 | { |
4499 | 1038 | if (ev.type() == mir_event_type_surface_output) | 1038 | if (ev.type() == mir_event_type_window_output) |
4500 | 1039 | { | 1039 | { |
4501 | 1040 | event = *ev.to_surface_output(); | 1040 | event = *ev.to_surface_output(); |
4502 | 1041 | } | 1041 | } |
4503 | @@ -1083,7 +1083,7 @@ | |||
4504 | 1083 | ON_CALL(*sender, handle_event(IsSurfaceOutputEvent())) | 1083 | ON_CALL(*sender, handle_event(IsSurfaceOutputEvent())) |
4505 | 1084 | .WillByDefault(Invoke([&event, &event_received](MirEvent const& ev) | 1084 | .WillByDefault(Invoke([&event, &event_received](MirEvent const& ev) |
4506 | 1085 | { | 1085 | { |
4508 | 1086 | if (ev.type() == mir_event_type_surface_output) | 1086 | if (ev.type() == mir_event_type_window_output) |
4509 | 1087 | { | 1087 | { |
4510 | 1088 | event = *ev.to_surface_output(); | 1088 | event = *ev.to_surface_output(); |
4511 | 1089 | } | 1089 | } |
4512 | @@ -1144,7 +1144,7 @@ | |||
4513 | 1144 | ON_CALL(*sender, handle_event(IsSurfaceOutputEvent())) | 1144 | ON_CALL(*sender, handle_event(IsSurfaceOutputEvent())) |
4514 | 1145 | .WillByDefault(Invoke([&event, &events_received](MirEvent const& ev) | 1145 | .WillByDefault(Invoke([&event, &events_received](MirEvent const& ev) |
4515 | 1146 | { | 1146 | { |
4517 | 1147 | if (ev.type() == mir_event_type_surface_output) | 1147 | if (ev.type() == mir_event_type_window_output) |
4518 | 1148 | { | 1148 | { |
4519 | 1149 | event = *ev.to_surface_output(); | 1149 | event = *ev.to_surface_output(); |
4520 | 1150 | } | 1150 | } |
4521 | 1151 | 1151 | ||
4522 | === modified file 'tests/unit-tests/scene/test_basic_surface.cpp' | |||
4523 | --- tests/unit-tests/scene/test_basic_surface.cpp 2016-11-09 02:30:14 +0000 | |||
4524 | +++ tests/unit-tests/scene/test_basic_surface.cpp 2017-01-10 20:52:04 +0000 | |||
4525 | @@ -64,7 +64,7 @@ | |||
4526 | 64 | class MockSurfaceObserver : public ms::NullSurfaceObserver | 64 | class MockSurfaceObserver : public ms::NullSurfaceObserver |
4527 | 65 | { | 65 | { |
4528 | 66 | public: | 66 | public: |
4530 | 67 | MOCK_METHOD2(attrib_changed, void(MirSurfaceAttrib, int)); | 67 | MOCK_METHOD2(attrib_changed, void(MirWindowAttrib, int)); |
4531 | 68 | MOCK_METHOD1(hidden_set_to, void(bool)); | 68 | MOCK_METHOD1(hidden_set_to, void(bool)); |
4532 | 69 | MOCK_METHOD1(renamed, void(char const*)); | 69 | MOCK_METHOD1(renamed, void(char const*)); |
4533 | 70 | MOCK_METHOD0(client_surface_close_requested, void()); | 70 | MOCK_METHOD0(client_surface_close_requested, void()); |
4534 | @@ -508,7 +508,7 @@ | |||
4535 | 508 | 508 | ||
4536 | 509 | struct AttributeTestParameters | 509 | struct AttributeTestParameters |
4537 | 510 | { | 510 | { |
4539 | 511 | MirSurfaceAttrib attribute; | 511 | MirWindowAttrib attribute; |
4540 | 512 | int default_value; | 512 | int default_value; |
4541 | 513 | int a_valid_value; | 513 | int a_valid_value; |
4542 | 514 | int an_invalid_value; | 514 | int an_invalid_value; |
4543 | @@ -520,42 +520,42 @@ | |||
4544 | 520 | }; | 520 | }; |
4545 | 521 | 521 | ||
4546 | 522 | AttributeTestParameters const surface_visibility_test_parameters{ | 522 | AttributeTestParameters const surface_visibility_test_parameters{ |
4548 | 523 | mir_surface_attrib_visibility, | 523 | mir_window_attrib_visibility, |
4549 | 524 | mir_surface_visibility_occluded, | 524 | mir_surface_visibility_occluded, |
4550 | 525 | mir_surface_visibility_exposed, | 525 | mir_surface_visibility_exposed, |
4551 | 526 | -1 | 526 | -1 |
4552 | 527 | }; | 527 | }; |
4553 | 528 | 528 | ||
4554 | 529 | AttributeTestParameters const surface_type_test_parameters{ | 529 | AttributeTestParameters const surface_type_test_parameters{ |
4558 | 530 | mir_surface_attrib_type, | 530 | mir_window_attrib_type, |
4559 | 531 | mir_surface_type_normal, | 531 | mir_window_type_normal, |
4560 | 532 | mir_surface_type_freestyle, | 532 | mir_window_type_freestyle, |
4561 | 533 | -1 | 533 | -1 |
4562 | 534 | }; | 534 | }; |
4563 | 535 | 535 | ||
4564 | 536 | AttributeTestParameters const surface_state_test_parameters{ | 536 | AttributeTestParameters const surface_state_test_parameters{ |
4566 | 537 | mir_surface_attrib_state, | 537 | mir_window_attrib_state, |
4567 | 538 | mir_surface_state_restored, | 538 | mir_surface_state_restored, |
4568 | 539 | mir_surface_state_fullscreen, | 539 | mir_surface_state_fullscreen, |
4569 | 540 | 1178312 | 540 | 1178312 |
4570 | 541 | }; | 541 | }; |
4571 | 542 | 542 | ||
4572 | 543 | AttributeTestParameters const surface_swapinterval_test_parameters{ | 543 | AttributeTestParameters const surface_swapinterval_test_parameters{ |
4574 | 544 | mir_surface_attrib_swapinterval, | 544 | mir_window_attrib_swapinterval, |
4575 | 545 | 1, | 545 | 1, |
4576 | 546 | 0, | 546 | 0, |
4577 | 547 | -1 | 547 | -1 |
4578 | 548 | }; | 548 | }; |
4579 | 549 | 549 | ||
4580 | 550 | AttributeTestParameters const surface_dpi_test_parameters{ | 550 | AttributeTestParameters const surface_dpi_test_parameters{ |
4582 | 551 | mir_surface_attrib_dpi, | 551 | mir_window_attrib_dpi, |
4583 | 552 | 0, | 552 | 0, |
4584 | 553 | 90, | 553 | 90, |
4585 | 554 | -1 | 554 | -1 |
4586 | 555 | }; | 555 | }; |
4587 | 556 | 556 | ||
4588 | 557 | AttributeTestParameters const surface_focus_test_parameters{ | 557 | AttributeTestParameters const surface_focus_test_parameters{ |
4590 | 558 | mir_surface_attrib_focus, | 558 | mir_window_attrib_focus, |
4591 | 559 | mir_surface_unfocused, | 559 | mir_surface_unfocused, |
4592 | 560 | mir_surface_focused, | 560 | mir_surface_focused, |
4593 | 561 | -1 | 561 | -1 |
4594 | @@ -920,9 +920,9 @@ | |||
4595 | 920 | EXPECT_CALL(*buffer_stream, drop_old_buffers()).Times(Exactly(1)); | 920 | EXPECT_CALL(*buffer_stream, drop_old_buffers()).Times(Exactly(1)); |
4596 | 921 | EXPECT_CALL(*mock_buffer_stream, drop_old_buffers()).Times(Exactly(1)); | 921 | EXPECT_CALL(*mock_buffer_stream, drop_old_buffers()).Times(Exactly(1)); |
4597 | 922 | 922 | ||
4601 | 923 | surface.configure(mir_surface_attrib_visibility, mir_surface_visibility_occluded); | 923 | surface.configure(mir_window_attrib_visibility, mir_surface_visibility_occluded); |
4602 | 924 | surface.configure(mir_surface_attrib_visibility, mir_surface_visibility_exposed); | 924 | surface.configure(mir_window_attrib_visibility, mir_surface_visibility_exposed); |
4603 | 925 | surface.configure(mir_surface_attrib_visibility, mir_surface_visibility_exposed); | 925 | surface.configure(mir_window_attrib_visibility, mir_surface_visibility_exposed); |
4604 | 926 | } | 926 | } |
4605 | 927 | 927 | ||
4606 | 928 | //TODO: per-stream alpha and swapinterval seems useful | 928 | //TODO: per-stream alpha and swapinterval seems useful |
4607 | @@ -988,7 +988,7 @@ | |||
4608 | 988 | EXPECT_CALL(*buffer_stream, allow_framedropping(true)); | 988 | EXPECT_CALL(*buffer_stream, allow_framedropping(true)); |
4609 | 989 | 989 | ||
4610 | 990 | surface.set_streams(streams); | 990 | surface.set_streams(streams); |
4612 | 991 | surface.configure(mir_surface_attrib_swapinterval, 0); | 991 | surface.configure(mir_window_attrib_swapinterval, 0); |
4613 | 992 | } | 992 | } |
4614 | 993 | 993 | ||
4615 | 994 | TEST_F(BasicSurfaceTest, visibility_matches_produced_list) | 994 | TEST_F(BasicSurfaceTest, visibility_matches_produced_list) |
4616 | @@ -1102,9 +1102,9 @@ | |||
4617 | 1102 | { | 1102 | { |
4618 | 1103 | struct VisibilityObserver : ms::NullSurfaceObserver | 1103 | struct VisibilityObserver : ms::NullSurfaceObserver |
4619 | 1104 | { | 1104 | { |
4621 | 1105 | void attrib_changed(MirSurfaceAttrib attrib, int value) override | 1105 | void attrib_changed(MirWindowAttrib attrib, int value) override |
4622 | 1106 | { | 1106 | { |
4624 | 1107 | if (attrib == mir_surface_attrib_visibility) | 1107 | if (attrib == mir_window_attrib_visibility) |
4625 | 1108 | { | 1108 | { |
4626 | 1109 | if (value == mir_surface_visibility_occluded) | 1109 | if (value == mir_surface_visibility_occluded) |
4627 | 1110 | hides_++; | 1110 | hides_++; |
4628 | @@ -1134,7 +1134,7 @@ | |||
4629 | 1134 | 1134 | ||
4630 | 1135 | EXPECT_THAT(observer->exposes(), Eq(0)); | 1135 | EXPECT_THAT(observer->exposes(), Eq(0)); |
4631 | 1136 | EXPECT_THAT(observer->hides(), Eq(0)); | 1136 | EXPECT_THAT(observer->hides(), Eq(0)); |
4633 | 1137 | surface.configure(mir_surface_attrib_visibility, mir_surface_visibility_exposed); | 1137 | surface.configure(mir_window_attrib_visibility, mir_surface_visibility_exposed); |
4634 | 1138 | 1138 | ||
4635 | 1139 | EXPECT_THAT(observer->exposes(), Eq(1)); | 1139 | EXPECT_THAT(observer->exposes(), Eq(1)); |
4636 | 1140 | EXPECT_THAT(observer->hides(), Eq(0)); | 1140 | EXPECT_THAT(observer->hides(), Eq(0)); |
4637 | 1141 | 1141 | ||
4638 | === modified file 'tests/unit-tests/scene/test_rendering_tracker.cpp' | |||
4639 | --- tests/unit-tests/scene/test_rendering_tracker.cpp 2015-06-25 03:00:08 +0000 | |||
4640 | +++ tests/unit-tests/scene/test_rendering_tracker.cpp 2017-01-10 20:52:04 +0000 | |||
4641 | @@ -48,7 +48,7 @@ | |||
4642 | 48 | 48 | ||
4643 | 49 | EXPECT_CALL( | 49 | EXPECT_CALL( |
4644 | 50 | *mock_surface, | 50 | *mock_surface, |
4646 | 51 | configure(mir_surface_attrib_visibility, mir_surface_visibility_occluded)); | 51 | configure(mir_window_attrib_visibility, mir_surface_visibility_occluded)); |
4647 | 52 | 52 | ||
4648 | 53 | tracker.active_compositors(compositors); | 53 | tracker.active_compositors(compositors); |
4649 | 54 | 54 | ||
4650 | @@ -63,7 +63,7 @@ | |||
4651 | 63 | 63 | ||
4652 | 64 | EXPECT_CALL( | 64 | EXPECT_CALL( |
4653 | 65 | *mock_surface, | 65 | *mock_surface, |
4655 | 66 | configure(mir_surface_attrib_visibility, mir_surface_visibility_exposed)); | 66 | configure(mir_window_attrib_visibility, mir_surface_visibility_exposed)); |
4656 | 67 | 67 | ||
4657 | 68 | tracker.active_compositors(compositors); | 68 | tracker.active_compositors(compositors); |
4658 | 69 | 69 | ||
4659 | @@ -78,7 +78,7 @@ | |||
4660 | 78 | 78 | ||
4661 | 79 | EXPECT_CALL( | 79 | EXPECT_CALL( |
4662 | 80 | *mock_surface, | 80 | *mock_surface, |
4664 | 81 | configure(mir_surface_attrib_visibility, mir_surface_visibility_exposed)); | 81 | configure(mir_window_attrib_visibility, mir_surface_visibility_exposed)); |
4665 | 82 | 82 | ||
4666 | 83 | tracker.active_compositors(compositors); | 83 | tracker.active_compositors(compositors); |
4667 | 84 | 84 | ||
4668 | @@ -94,7 +94,7 @@ | |||
4669 | 94 | 94 | ||
4670 | 95 | EXPECT_CALL( | 95 | EXPECT_CALL( |
4671 | 96 | *mock_surface, | 96 | *mock_surface, |
4673 | 97 | configure(mir_surface_attrib_visibility, mir_surface_visibility_occluded)) | 97 | configure(mir_window_attrib_visibility, mir_surface_visibility_occluded)) |
4674 | 98 | .Times(0); | 98 | .Times(0); |
4675 | 99 | 99 | ||
4676 | 100 | tracker.active_compositors(compositors); | 100 | tracker.active_compositors(compositors); |
4677 | @@ -111,7 +111,7 @@ | |||
4678 | 111 | 111 | ||
4679 | 112 | EXPECT_CALL( | 112 | EXPECT_CALL( |
4680 | 113 | *mock_surface, | 113 | *mock_surface, |
4682 | 114 | configure(mir_surface_attrib_visibility, mir_surface_visibility_occluded)); | 114 | configure(mir_window_attrib_visibility, mir_surface_visibility_occluded)); |
4683 | 115 | 115 | ||
4684 | 116 | tracker.active_compositors(compositors); | 116 | tracker.active_compositors(compositors); |
4685 | 117 | 117 | ||
4686 | @@ -136,7 +136,7 @@ | |||
4687 | 136 | 136 | ||
4688 | 137 | EXPECT_CALL( | 137 | EXPECT_CALL( |
4689 | 138 | *mock_surface, | 138 | *mock_surface, |
4691 | 139 | configure(mir_surface_attrib_visibility, mir_surface_visibility_occluded)); | 139 | configure(mir_window_attrib_visibility, mir_surface_visibility_occluded)); |
4692 | 140 | 140 | ||
4693 | 141 | compositors.erase(compositor_id3); | 141 | compositors.erase(compositor_id3); |
4694 | 142 | tracker.active_compositors(compositors); | 142 | tracker.active_compositors(compositors); |
4695 | 143 | 143 | ||
4696 | === modified file 'tests/unit-tests/scene/test_surface.cpp' | |||
4697 | --- tests/unit-tests/scene/test_surface.cpp 2016-11-11 06:59:42 +0000 | |||
4698 | +++ tests/unit-tests/scene/test_surface.cpp 2017-01-10 20:52:04 +0000 | |||
4699 | @@ -93,7 +93,7 @@ | |||
4700 | 93 | MirPixelFormat const format{mir_pixel_format_abgr_8888}; | 93 | MirPixelFormat const format{mir_pixel_format_abgr_8888}; |
4701 | 94 | std::string name{"surface"}; | 94 | std::string name{"surface"}; |
4702 | 95 | MirSurfaceState state{mir_surface_state_fullscreen}; | 95 | MirSurfaceState state{mir_surface_state_fullscreen}; |
4704 | 96 | MirSurfaceType type{mir_surface_type_dialog}; | 96 | MirWindowType type{mir_window_type_dialog}; |
4705 | 97 | MirOrientationMode mode{mir_orientation_mode_landscape}; | 97 | MirOrientationMode mode{mir_orientation_mode_landscape}; |
4706 | 98 | mf::SurfaceId surf_id{1000}; | 98 | mf::SurfaceId surf_id{1000}; |
4707 | 99 | 99 | ||
4708 | 100 | 100 | ||
4709 | === modified file 'tests/unit-tests/scene/test_surface_impl.cpp' | |||
4710 | --- tests/unit-tests/scene/test_surface_impl.cpp 2016-11-11 06:59:42 +0000 | |||
4711 | +++ tests/unit-tests/scene/test_surface_impl.cpp 2017-01-10 20:52:04 +0000 | |||
4712 | @@ -102,7 +102,7 @@ | |||
4713 | 102 | using namespace testing; | 102 | using namespace testing; |
4714 | 103 | 103 | ||
4715 | 104 | EXPECT_THROW({ | 104 | EXPECT_THROW({ |
4717 | 105 | surface->configure(static_cast<MirSurfaceAttrib>(111), 222); | 105 | surface->configure(static_cast<MirWindowAttrib>(111), 222); |
4718 | 106 | }, std::logic_error); | 106 | }, std::logic_error); |
4719 | 107 | } | 107 | } |
4720 | 108 | 108 | ||
4721 | @@ -110,30 +110,30 @@ | |||
4722 | 110 | { | 110 | { |
4723 | 111 | using namespace testing; | 111 | using namespace testing; |
4724 | 112 | 112 | ||
4749 | 113 | EXPECT_EQ(mir_surface_type_normal, surface->type()); | 113 | EXPECT_EQ(mir_window_type_normal, surface->type()); |
4750 | 114 | 114 | ||
4751 | 115 | EXPECT_EQ(mir_surface_type_utility, | 115 | EXPECT_EQ(mir_window_type_utility, |
4752 | 116 | surface->configure(mir_surface_attrib_type, | 116 | surface->configure(mir_window_attrib_type, |
4753 | 117 | mir_surface_type_utility)); | 117 | mir_window_type_utility)); |
4754 | 118 | EXPECT_EQ(mir_surface_type_utility, surface->type()); | 118 | EXPECT_EQ(mir_window_type_utility, surface->type()); |
4755 | 119 | 119 | ||
4756 | 120 | EXPECT_THROW({ | 120 | EXPECT_THROW({ |
4757 | 121 | surface->configure(mir_surface_attrib_type, 999); | 121 | surface->configure(mir_window_attrib_type, 999); |
4758 | 122 | }, std::logic_error); | 122 | }, std::logic_error); |
4759 | 123 | EXPECT_THROW({ | 123 | EXPECT_THROW({ |
4760 | 124 | surface->configure(mir_surface_attrib_type, -1); | 124 | surface->configure(mir_window_attrib_type, -1); |
4761 | 125 | }, std::logic_error); | 125 | }, std::logic_error); |
4762 | 126 | EXPECT_EQ(mir_surface_type_utility, surface->type()); | 126 | EXPECT_EQ(mir_window_type_utility, surface->type()); |
4763 | 127 | 127 | ||
4764 | 128 | EXPECT_EQ(mir_surface_type_dialog, | 128 | EXPECT_EQ(mir_window_type_dialog, |
4765 | 129 | surface->configure(mir_surface_attrib_type, | 129 | surface->configure(mir_window_attrib_type, |
4766 | 130 | mir_surface_type_dialog)); | 130 | mir_window_type_dialog)); |
4767 | 131 | EXPECT_EQ(mir_surface_type_dialog, surface->type()); | 131 | EXPECT_EQ(mir_window_type_dialog, surface->type()); |
4768 | 132 | 132 | ||
4769 | 133 | EXPECT_EQ(mir_surface_type_freestyle, | 133 | EXPECT_EQ(mir_window_type_freestyle, |
4770 | 134 | surface->configure(mir_surface_attrib_type, | 134 | surface->configure(mir_window_attrib_type, |
4771 | 135 | mir_surface_type_freestyle)); | 135 | mir_window_type_freestyle)); |
4772 | 136 | EXPECT_EQ(mir_surface_type_freestyle, surface->type()); | 136 | EXPECT_EQ(mir_window_type_freestyle, surface->type()); |
4773 | 137 | } | 137 | } |
4774 | 138 | 138 | ||
4775 | 139 | TEST_F(Surface, states) | 139 | TEST_F(Surface, states) |
4776 | @@ -143,25 +143,25 @@ | |||
4777 | 143 | EXPECT_EQ(mir_surface_state_restored, surface->state()); | 143 | EXPECT_EQ(mir_surface_state_restored, surface->state()); |
4778 | 144 | 144 | ||
4779 | 145 | EXPECT_EQ(mir_surface_state_vertmaximized, | 145 | EXPECT_EQ(mir_surface_state_vertmaximized, |
4781 | 146 | surface->configure(mir_surface_attrib_state, | 146 | surface->configure(mir_window_attrib_state, |
4782 | 147 | mir_surface_state_vertmaximized)); | 147 | mir_surface_state_vertmaximized)); |
4783 | 148 | EXPECT_EQ(mir_surface_state_vertmaximized, surface->state()); | 148 | EXPECT_EQ(mir_surface_state_vertmaximized, surface->state()); |
4784 | 149 | 149 | ||
4785 | 150 | EXPECT_THROW({ | 150 | EXPECT_THROW({ |
4787 | 151 | surface->configure(mir_surface_attrib_state, 999); | 151 | surface->configure(mir_window_attrib_state, 999); |
4788 | 152 | }, std::logic_error); | 152 | }, std::logic_error); |
4789 | 153 | EXPECT_THROW({ | 153 | EXPECT_THROW({ |
4791 | 154 | surface->configure(mir_surface_attrib_state, -1); | 154 | surface->configure(mir_window_attrib_state, -1); |
4792 | 155 | }, std::logic_error); | 155 | }, std::logic_error); |
4793 | 156 | EXPECT_EQ(mir_surface_state_vertmaximized, surface->state()); | 156 | EXPECT_EQ(mir_surface_state_vertmaximized, surface->state()); |
4794 | 157 | 157 | ||
4795 | 158 | EXPECT_EQ(mir_surface_state_minimized, | 158 | EXPECT_EQ(mir_surface_state_minimized, |
4797 | 159 | surface->configure(mir_surface_attrib_state, | 159 | surface->configure(mir_window_attrib_state, |
4798 | 160 | mir_surface_state_minimized)); | 160 | mir_surface_state_minimized)); |
4799 | 161 | EXPECT_EQ(mir_surface_state_minimized, surface->state()); | 161 | EXPECT_EQ(mir_surface_state_minimized, surface->state()); |
4800 | 162 | 162 | ||
4801 | 163 | EXPECT_EQ(mir_surface_state_fullscreen, | 163 | EXPECT_EQ(mir_surface_state_fullscreen, |
4803 | 164 | surface->configure(mir_surface_attrib_state, | 164 | surface->configure(mir_window_attrib_state, |
4804 | 165 | mir_surface_state_fullscreen)); | 165 | mir_surface_state_fullscreen)); |
4805 | 166 | EXPECT_EQ(mir_surface_state_fullscreen, surface->state()); | 166 | EXPECT_EQ(mir_surface_state_fullscreen, surface->state()); |
4806 | 167 | } | 167 | } |
4807 | @@ -235,9 +235,9 @@ | |||
4808 | 235 | 235 | ||
4809 | 236 | { | 236 | { |
4810 | 237 | InSequence seq; | 237 | InSequence seq; |
4812 | 238 | EXPECT_CALL(sink, handle_event(mt::SurfaceEvent(mir_surface_attrib_focus, mir_surface_focused))) | 238 | EXPECT_CALL(sink, handle_event(mt::WindowEvent(mir_window_attrib_focus, mir_surface_focused))) |
4813 | 239 | .Times(1); | 239 | .Times(1); |
4815 | 240 | EXPECT_CALL(sink, handle_event(mt::SurfaceEvent(mir_surface_attrib_focus, mir_surface_unfocused))) | 240 | EXPECT_CALL(sink, handle_event(mt::WindowEvent(mir_window_attrib_focus, mir_surface_unfocused))) |
4816 | 241 | .Times(1); | 241 | .Times(1); |
4817 | 242 | } | 242 | } |
4818 | 243 | 243 | ||
4819 | @@ -246,8 +246,8 @@ | |||
4820 | 246 | 246 | ||
4821 | 247 | surface->add_observer(observer); | 247 | surface->add_observer(observer); |
4822 | 248 | 248 | ||
4825 | 249 | surface->configure(mir_surface_attrib_focus, mir_surface_focused); | 249 | surface->configure(mir_window_attrib_focus, mir_surface_focused); |
4826 | 250 | surface->configure(mir_surface_attrib_focus, mir_surface_unfocused); | 250 | surface->configure(mir_window_attrib_focus, mir_surface_unfocused); |
4827 | 251 | } | 251 | } |
4828 | 252 | MATCHER_P(MirCloseSurfaceEventMatches, event, "") | 252 | MATCHER_P(MirCloseSurfaceEventMatches, event, "") |
4829 | 253 | { | 253 | { |
4830 | @@ -286,5 +286,5 @@ | |||
4831 | 286 | std::shared_ptr<mg::CursorImage>(), | 286 | std::shared_ptr<mg::CursorImage>(), |
4832 | 287 | report); | 287 | report); |
4833 | 288 | 288 | ||
4835 | 289 | EXPECT_EQ(mir_orientation_mode_any, surf.query(mir_surface_attrib_preferred_orientation)); | 289 | EXPECT_EQ(mir_orientation_mode_any, surf.query(mir_window_attrib_preferred_orientation)); |
4836 | 290 | } | 290 | } |
4837 | 291 | 291 | ||
4838 | === modified file 'tests/unit-tests/scene/test_surface_stack.cpp' | |||
4839 | --- tests/unit-tests/scene/test_surface_stack.cpp 2016-11-16 13:08:55 +0000 | |||
4840 | +++ tests/unit-tests/scene/test_surface_stack.cpp 2017-01-10 20:52:04 +0000 | |||
4841 | @@ -281,7 +281,7 @@ | |||
4842 | 281 | std::shared_ptr<mg::CursorImage>(), | 281 | std::shared_ptr<mg::CursorImage>(), |
4843 | 282 | report); | 282 | report); |
4844 | 283 | stack.add_surface(surface, default_params.input_mode); | 283 | stack.add_surface(surface, default_params.input_mode); |
4846 | 284 | surface->configure(mir_surface_attrib_visibility, | 284 | surface->configure(mir_window_attrib_visibility, |
4847 | 285 | mir_surface_visibility_exposed); | 285 | mir_surface_visibility_exposed); |
4848 | 286 | 286 | ||
4849 | 287 | auto elements = stack.scene_elements_for(compositor_id); | 287 | auto elements = stack.scene_elements_for(compositor_id); |
4850 | @@ -310,7 +310,7 @@ | |||
4851 | 310 | std::shared_ptr<mg::CursorImage>(), | 310 | std::shared_ptr<mg::CursorImage>(), |
4852 | 311 | report); | 311 | report); |
4853 | 312 | stack.add_surface(surface, default_params.input_mode); | 312 | stack.add_surface(surface, default_params.input_mode); |
4855 | 313 | surface->configure(mir_surface_attrib_visibility, | 313 | surface->configure(mir_window_attrib_visibility, |
4856 | 314 | mir_surface_visibility_exposed); | 314 | mir_surface_visibility_exposed); |
4857 | 315 | 315 | ||
4858 | 316 | // (change directory in shell app) | 316 | // (change directory in shell app) |
4859 | @@ -356,7 +356,7 @@ | |||
4860 | 356 | std::shared_ptr<mg::CursorImage>(), | 356 | std::shared_ptr<mg::CursorImage>(), |
4861 | 357 | report); | 357 | report); |
4862 | 358 | stack.add_surface(surface, default_params.input_mode); | 358 | stack.add_surface(surface, default_params.input_mode); |
4864 | 359 | surface->configure(mir_surface_attrib_visibility, | 359 | surface->configure(mir_window_attrib_visibility, |
4865 | 360 | mir_surface_visibility_exposed); | 360 | mir_surface_visibility_exposed); |
4866 | 361 | 361 | ||
4867 | 362 | EXPECT_EQ(0, stack.frames_pending(this)); | 362 | EXPECT_EQ(0, stack.frames_pending(this)); |
4868 | @@ -811,7 +811,7 @@ | |||
4869 | 811 | mir::report::null_scene_report()) | 811 | mir::report::null_scene_report()) |
4870 | 812 | { | 812 | { |
4871 | 813 | } | 813 | } |
4873 | 814 | MOCK_METHOD2(configure, int(MirSurfaceAttrib, int)); | 814 | MOCK_METHOD2(configure, int(MirWindowAttrib, int)); |
4874 | 815 | }; | 815 | }; |
4875 | 816 | } | 816 | } |
4876 | 817 | 817 | ||
4877 | @@ -834,7 +834,7 @@ | |||
4878 | 834 | auto const elements2 = stack.scene_elements_for(compositor_id2); | 834 | auto const elements2 = stack.scene_elements_for(compositor_id2); |
4879 | 835 | ASSERT_THAT(elements2.size(), Eq(1u)); | 835 | ASSERT_THAT(elements2.size(), Eq(1u)); |
4880 | 836 | 836 | ||
4882 | 837 | EXPECT_CALL(*mock_surface, configure(mir_surface_attrib_visibility, mir_surface_visibility_occluded)); | 837 | EXPECT_CALL(*mock_surface, configure(mir_window_attrib_visibility, mir_surface_visibility_occluded)); |
4883 | 838 | 838 | ||
4884 | 839 | elements.back()->occluded(); | 839 | elements.back()->occluded(); |
4885 | 840 | elements2.back()->occluded(); | 840 | elements2.back()->occluded(); |
4886 | @@ -857,7 +857,7 @@ | |||
4887 | 857 | auto const elements2 = stack.scene_elements_for(compositor_id2); | 857 | auto const elements2 = stack.scene_elements_for(compositor_id2); |
4888 | 858 | ASSERT_THAT(elements2.size(), Eq(1u)); | 858 | ASSERT_THAT(elements2.size(), Eq(1u)); |
4889 | 859 | 859 | ||
4891 | 860 | EXPECT_CALL(*mock_surface, configure(mir_surface_attrib_visibility, mir_surface_visibility_exposed)); | 860 | EXPECT_CALL(*mock_surface, configure(mir_window_attrib_visibility, mir_surface_visibility_exposed)); |
4892 | 861 | 861 | ||
4893 | 862 | elements.back()->occluded(); | 862 | elements.back()->occluded(); |
4894 | 863 | elements2.back()->rendered(); | 863 | elements2.back()->rendered(); |
4895 | @@ -884,7 +884,7 @@ | |||
4896 | 884 | auto const elements3 = stack.scene_elements_for(compositor_id3); | 884 | auto const elements3 = stack.scene_elements_for(compositor_id3); |
4897 | 885 | ASSERT_THAT(elements3.size(), Eq(1u)); | 885 | ASSERT_THAT(elements3.size(), Eq(1u)); |
4898 | 886 | 886 | ||
4900 | 887 | EXPECT_CALL(*mock_surface, configure(mir_surface_attrib_visibility, mir_surface_visibility_exposed)) | 887 | EXPECT_CALL(*mock_surface, configure(mir_window_attrib_visibility, mir_surface_visibility_exposed)) |
4901 | 888 | .Times(2); | 888 | .Times(2); |
4902 | 889 | 889 | ||
4903 | 890 | elements.back()->occluded(); | 890 | elements.back()->occluded(); |
4904 | @@ -893,7 +893,7 @@ | |||
4905 | 893 | 893 | ||
4906 | 894 | Mock::VerifyAndClearExpectations(mock_surface.get()); | 894 | Mock::VerifyAndClearExpectations(mock_surface.get()); |
4907 | 895 | 895 | ||
4909 | 896 | EXPECT_CALL(*mock_surface, configure(mir_surface_attrib_visibility, mir_surface_visibility_occluded)); | 896 | EXPECT_CALL(*mock_surface, configure(mir_window_attrib_visibility, mir_surface_visibility_occluded)); |
4910 | 897 | 897 | ||
4911 | 898 | stack.unregister_compositor(compositor_id2); | 898 | stack.unregister_compositor(compositor_id2); |
4912 | 899 | stack.unregister_compositor(compositor_id3); | 899 | stack.unregister_compositor(compositor_id3); |
4913 | @@ -978,8 +978,8 @@ | |||
4914 | 978 | stack.add_surface(stub_surface2, default_params.input_mode); | 978 | stack.add_surface(stub_surface2, default_params.input_mode); |
4915 | 979 | 979 | ||
4916 | 980 | // Configure surface1 and surface2 to appear in input enumeration. | 980 | // Configure surface1 and surface2 to appear in input enumeration. |
4919 | 981 | stub_surface1->configure(mir_surface_attrib_visibility, MirSurfaceVisibility::mir_surface_visibility_exposed); | 981 | stub_surface1->configure(mir_window_attrib_visibility, MirSurfaceVisibility::mir_surface_visibility_exposed); |
4920 | 982 | stub_surface2->configure(mir_surface_attrib_visibility, MirSurfaceVisibility::mir_surface_visibility_exposed); | 982 | stub_surface2->configure(mir_window_attrib_visibility, MirSurfaceVisibility::mir_surface_visibility_exposed); |
4921 | 983 | 983 | ||
4922 | 984 | stack.add_input_visualization(mt::fake_shared(r)); | 984 | stack.add_input_visualization(mt::fake_shared(r)); |
4923 | 985 | 985 | ||
4924 | @@ -1056,9 +1056,9 @@ | |||
4925 | 1056 | stack.add_surface(stub_surface2, default_params.input_mode); | 1056 | stack.add_surface(stub_surface2, default_params.input_mode); |
4926 | 1057 | stack.add_surface(stub_surface3, default_params.input_mode); | 1057 | stack.add_surface(stub_surface3, default_params.input_mode); |
4927 | 1058 | 1058 | ||
4931 | 1059 | stub_surface1->configure(mir_surface_attrib_visibility, MirSurfaceVisibility::mir_surface_visibility_exposed); | 1059 | stub_surface1->configure(mir_window_attrib_visibility, MirSurfaceVisibility::mir_surface_visibility_exposed); |
4932 | 1060 | stub_surface2->configure(mir_surface_attrib_visibility, MirSurfaceVisibility::mir_surface_visibility_occluded); | 1060 | stub_surface2->configure(mir_window_attrib_visibility, MirSurfaceVisibility::mir_surface_visibility_occluded); |
4933 | 1061 | stub_surface3->configure(mir_surface_attrib_visibility, MirSurfaceVisibility::mir_surface_visibility_occluded); | 1061 | stub_surface3->configure(mir_window_attrib_visibility, MirSurfaceVisibility::mir_surface_visibility_occluded); |
4934 | 1062 | 1062 | ||
4935 | 1063 | int num_exposed_surfaces = 0; | 1063 | int num_exposed_surfaces = 0; |
4936 | 1064 | auto const count_exposed_surfaces = [&num_exposed_surfaces](std::shared_ptr<mi::Surface> const&){ | 1064 | auto const count_exposed_surfaces = [&num_exposed_surfaces](std::shared_ptr<mi::Surface> const&){ |