Merge lp:~alan-griffiths/miral/deconflate-output-from-display into lp:miral
- deconflate-output-from-display
- Merge into trunk
Proposed by
Alan Griffiths
Status: | Merged |
---|---|
Approved by: | Alan Griffiths |
Approved revision: | 573 |
Merged at revision: | 571 |
Proposed branch: | lp:~alan-griffiths/miral/deconflate-output-from-display |
Merge into: | lp:miral |
Diff against target: |
494 lines (+69/-63) 12 files modified
debian/libmiral2.symbols (+1/-0) include/miral/window_manager_tools.h (+2/-2) miral-shell/floating_window_manager.cpp (+5/-5) miral-shell/tiling_window_manager.cpp (+4/-4) miral-shell/tiling_window_manager.h (+1/-1) miral/basic_window_manager.cpp (+43/-43) miral/basic_window_manager.h (+2/-2) miral/symbols.map (+1/-0) miral/window_management_trace.cpp (+2/-2) miral/window_management_trace.h (+1/-1) miral/window_manager_tools.cpp (+6/-2) miral/window_manager_tools_implementation.h (+1/-1) |
To merge this branch: | bzr merge lp:~alan-griffiths/miral/deconflate-output-from-display |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gerry Boland (community) | Approve | ||
Mir CI Bot | continuous-integration | Approve | |
Review via email: mp+328221@code.launchpad.net |
Commit message
Correct some conflation of the display and the outputs it includes
Description of the change
To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote : | # |
review:
Approve
(continuous-integration)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/libmiral2.symbols' | |||
2 | --- debian/libmiral2.symbols 2017-07-26 10:52:45 +0000 | |||
3 | +++ debian/libmiral2.symbols 2017-07-28 13:57:06 +0000 | |||
4 | @@ -395,3 +395,4 @@ | |||
5 | 395 | (c++)"typeinfo for miral::WindowManagementPolicyAddendum2@MIRAL_1.4.0" 1.4.0 | 395 | (c++)"typeinfo for miral::WindowManagementPolicyAddendum2@MIRAL_1.4.0" 1.4.0 |
6 | 396 | MIRAL_1.5.0@MIRAL_1.5.0 1.5.0 | 396 | MIRAL_1.5.0@MIRAL_1.5.0 1.5.0 |
7 | 397 | (c++)"typeinfo for miral::WindowManagementPolicyAddendum3@MIRAL_1.5.0" 1.5.0 | 397 | (c++)"typeinfo for miral::WindowManagementPolicyAddendum3@MIRAL_1.5.0" 1.5.0 |
8 | 398 | (c++)"miral::WindowManagerTools::active_output()@MIRAL_1.5.0" 1.5.0 | ||
9 | 398 | \ No newline at end of file | 399 | \ No newline at end of file |
10 | 399 | 400 | ||
11 | === modified file 'include/miral/window_manager_tools.h' | |||
12 | --- include/miral/window_manager_tools.h 2017-03-23 11:25:25 +0000 | |||
13 | +++ include/miral/window_manager_tools.h 2017-07-28 13:57:06 +0000 | |||
14 | @@ -160,8 +160,8 @@ | |||
15 | 160 | /// Find the topmost window at the cursor | 160 | /// Find the topmost window at the cursor |
16 | 161 | auto window_at(mir::geometry::Point cursor) const -> Window; | 161 | auto window_at(mir::geometry::Point cursor) const -> Window; |
17 | 162 | 162 | ||
20 | 163 | /// Find the active display area | 163 | /// Find the active output area |
21 | 164 | auto active_display() -> mir::geometry::Rectangle const; | 164 | auto active_output() -> mir::geometry::Rectangle const; |
22 | 165 | 165 | ||
23 | 166 | /// Raise window and all its children | 166 | /// Raise window and all its children |
24 | 167 | void raise_tree(Window const& root); | 167 | void raise_tree(Window const& root); |
25 | 168 | 168 | ||
26 | === modified file 'miral-shell/floating_window_manager.cpp' | |||
27 | --- miral-shell/floating_window_manager.cpp 2017-07-28 13:43:24 +0000 | |||
28 | +++ miral-shell/floating_window_manager.cpp 2017-07-28 13:57:06 +0000 | |||
29 | @@ -468,7 +468,7 @@ | |||
30 | 468 | { | 468 | { |
31 | 469 | if (auto active_window = tools.active_window()) | 469 | if (auto active_window = tools.active_window()) |
32 | 470 | { | 470 | { |
34 | 471 | auto active_display = tools.active_display(); | 471 | auto active_output = tools.active_output(); |
35 | 472 | auto& window_info = tools.info_for(active_window); | 472 | auto& window_info = tools.info_for(active_window); |
36 | 473 | WindowSpecification modifications; | 473 | WindowSpecification modifications; |
37 | 474 | 474 | ||
38 | @@ -477,13 +477,13 @@ | |||
39 | 477 | case KEY_LEFT: | 477 | case KEY_LEFT: |
40 | 478 | modifications.state() = mir_window_state_vertmaximized; | 478 | modifications.state() = mir_window_state_vertmaximized; |
41 | 479 | tools.place_and_size_for_state(modifications, window_info); | 479 | tools.place_and_size_for_state(modifications, window_info); |
43 | 480 | modifications.top_left() = active_display.top_left + title_bar_height; | 480 | modifications.top_left() = active_output.top_left + title_bar_height; |
44 | 481 | break; | 481 | break; |
45 | 482 | 482 | ||
46 | 483 | case KEY_RIGHT: | 483 | case KEY_RIGHT: |
47 | 484 | modifications.state() = mir_window_state_vertmaximized; | 484 | modifications.state() = mir_window_state_vertmaximized; |
48 | 485 | tools.place_and_size_for_state(modifications, window_info); | 485 | tools.place_and_size_for_state(modifications, window_info); |
50 | 486 | modifications.top_left() = active_display.top_right() - | 486 | modifications.top_left() = active_output.top_right() - |
51 | 487 | as_displacement({active_window.size().width, 0}) + title_bar_height; | 487 | as_displacement({active_window.size().width, 0}) + title_bar_height; |
52 | 488 | break; | 488 | break; |
53 | 489 | 489 | ||
54 | @@ -491,14 +491,14 @@ | |||
55 | 491 | modifications.state() = mir_window_state_horizmaximized; | 491 | modifications.state() = mir_window_state_horizmaximized; |
56 | 492 | tools.place_and_size_for_state(modifications, window_info); | 492 | tools.place_and_size_for_state(modifications, window_info); |
57 | 493 | 493 | ||
59 | 494 | modifications.top_left() = active_display.top_left + title_bar_height; | 494 | modifications.top_left() = active_output.top_left + title_bar_height; |
60 | 495 | break; | 495 | break; |
61 | 496 | 496 | ||
62 | 497 | case KEY_DOWN: | 497 | case KEY_DOWN: |
63 | 498 | modifications.state() = mir_window_state_horizmaximized; | 498 | modifications.state() = mir_window_state_horizmaximized; |
64 | 499 | tools.place_and_size_for_state(modifications, window_info); | 499 | tools.place_and_size_for_state(modifications, window_info); |
65 | 500 | 500 | ||
67 | 501 | modifications.top_left() = active_display.bottom_right() - as_displacement( | 501 | modifications.top_left() = active_output.bottom_right() - as_displacement( |
68 | 502 | modifications.size().is_set() ? modifications.size().value() : active_window.size()); | 502 | modifications.size().is_set() ? modifications.size().value() : active_window.size()); |
69 | 503 | break; | 503 | break; |
70 | 504 | 504 | ||
71 | 505 | 505 | ||
72 | === modified file 'miral-shell/tiling_window_manager.cpp' | |||
73 | --- miral-shell/tiling_window_manager.cpp 2017-07-24 15:30:22 +0000 | |||
74 | +++ miral-shell/tiling_window_manager.cpp 2017-07-28 13:57:06 +0000 | |||
75 | @@ -457,13 +457,13 @@ | |||
76 | 457 | { return spinner.session() != info.application() && tile_for(info).contains(position);}); | 457 | { return spinner.session() != info.application() && tile_for(info).contains(position);}); |
77 | 458 | } | 458 | } |
78 | 459 | 459 | ||
80 | 460 | void TilingWindowManagerPolicy::update_tiles(Rectangles const& displays) | 460 | void TilingWindowManagerPolicy::update_tiles(Rectangles const& outputs) |
81 | 461 | { | 461 | { |
82 | 462 | auto const tile_count = tiles.count(); | 462 | auto const tile_count = tiles.count(); |
83 | 463 | 463 | ||
85 | 464 | if (tile_count < 1 || displays.size() < 1) return; | 464 | if (tile_count < 1 || outputs.size() < 1) return; |
86 | 465 | 465 | ||
88 | 466 | auto const bounding_rect = displays.bounding_rectangle(); | 466 | auto const bounding_rect = outputs.bounding_rectangle(); |
89 | 467 | 467 | ||
90 | 468 | auto const total_width = bounding_rect.size.width.as_int(); | 468 | auto const total_width = bounding_rect.size.width.as_int(); |
91 | 469 | auto const total_height = bounding_rect.size.height.as_int(); | 469 | auto const total_height = bounding_rect.size.height.as_int(); |
92 | @@ -674,7 +674,7 @@ | |||
93 | 674 | { | 674 | { |
94 | 675 | if (dirty_displays) | 675 | if (dirty_displays) |
95 | 676 | { | 676 | { |
97 | 677 | // Need to acquire lock before accessing displays & dirty_tiles | 677 | // Need to acquire lock before accessing outputs & dirty_tiles |
98 | 678 | tools.invoke_under_lock([this] | 678 | tools.invoke_under_lock([this] |
99 | 679 | { | 679 | { |
100 | 680 | displays = live_displays; | 680 | displays = live_displays; |
101 | 681 | 681 | ||
102 | === modified file 'miral-shell/tiling_window_manager.h' | |||
103 | --- miral-shell/tiling_window_manager.h 2017-03-06 09:26:44 +0000 | |||
104 | +++ miral-shell/tiling_window_manager.h 2017-07-28 13:57:06 +0000 | |||
105 | @@ -95,7 +95,7 @@ | |||
106 | 95 | 95 | ||
107 | 96 | miral::Application application_under(Point position); | 96 | miral::Application application_under(Point position); |
108 | 97 | 97 | ||
110 | 98 | void update_tiles(Rectangles const& displays); | 98 | void update_tiles(Rectangles const& outputs); |
111 | 99 | void update_surfaces(miral::ApplicationInfo& info, Rectangle const& old_tile, Rectangle const& new_tile); | 99 | void update_surfaces(miral::ApplicationInfo& info, Rectangle const& old_tile, Rectangle const& new_tile); |
112 | 100 | 100 | ||
113 | 101 | auto transform_set_state(MirWindowState value) -> MirWindowState; | 101 | auto transform_set_state(MirWindowState value) -> MirWindowState; |
114 | 102 | 102 | ||
115 | === modified file 'miral/basic_window_manager.cpp' | |||
116 | --- miral/basic_window_manager.cpp 2017-07-28 08:54:30 +0000 | |||
117 | +++ miral/basic_window_manager.cpp 2017-07-28 13:57:06 +0000 | |||
118 | @@ -727,7 +727,7 @@ | |||
119 | 727 | return surface_at ? info_for(surface_at).window() : Window{}; | 727 | return surface_at ? info_for(surface_at).window() : Window{}; |
120 | 728 | } | 728 | } |
121 | 729 | 729 | ||
123 | 730 | auto miral::BasicWindowManager::active_display() | 730 | auto miral::BasicWindowManager::active_output() |
124 | 731 | -> geometry::Rectangle const | 731 | -> geometry::Rectangle const |
125 | 732 | { | 732 | { |
126 | 733 | geometry::Rectangle result; | 733 | geometry::Rectangle result; |
127 | @@ -739,13 +739,13 @@ | |||
128 | 739 | auto const surface_rect = surface->input_bounds(); | 739 | auto const surface_rect = surface->input_bounds(); |
129 | 740 | int max_overlap_area = -1; | 740 | int max_overlap_area = -1; |
130 | 741 | 741 | ||
132 | 742 | for (auto const& display : displays) | 742 | for (auto const& output : outputs) |
133 | 743 | { | 743 | { |
135 | 744 | auto const intersection = surface_rect.intersection_with(display).size; | 744 | auto const intersection = surface_rect.intersection_with(output).size; |
136 | 745 | if (intersection.width.as_int()*intersection.height.as_int() > max_overlap_area) | 745 | if (intersection.width.as_int()*intersection.height.as_int() > max_overlap_area) |
137 | 746 | { | 746 | { |
138 | 747 | max_overlap_area = intersection.width.as_int()*intersection.height.as_int(); | 747 | max_overlap_area = intersection.width.as_int()*intersection.height.as_int(); |
140 | 748 | result = display; | 748 | result = output; |
141 | 749 | } | 749 | } |
142 | 750 | } | 750 | } |
143 | 751 | return result; | 751 | return result; |
144 | @@ -757,20 +757,20 @@ | |||
145 | 757 | // available. | 757 | // available. |
146 | 758 | 758 | ||
147 | 759 | // 3. Otherwise, the display that contains the pointer, if there is one. | 759 | // 3. Otherwise, the display that contains the pointer, if there is one. |
149 | 760 | for (auto const& display : displays) | 760 | for (auto const& output : outputs) |
150 | 761 | { | 761 | { |
152 | 762 | if (display.contains(cursor)) | 762 | if (output.contains(cursor)) |
153 | 763 | { | 763 | { |
154 | 764 | // Ignore the (unspecified) possiblity of overlapping displays | 764 | // Ignore the (unspecified) possiblity of overlapping displays |
156 | 765 | return display; | 765 | return output; |
157 | 766 | } | 766 | } |
158 | 767 | } | 767 | } |
159 | 768 | 768 | ||
160 | 769 | // 4. Otherwise, the primary display, if there is one (for example, the laptop display). | 769 | // 4. Otherwise, the primary display, if there is one (for example, the laptop display). |
161 | 770 | 770 | ||
162 | 771 | // 5. Otherwise, the first display. | 771 | // 5. Otherwise, the first display. |
165 | 772 | if (displays.size()) | 772 | if (outputs.size()) |
166 | 773 | result = *displays.begin(); | 773 | result = *outputs.begin(); |
167 | 774 | 774 | ||
168 | 775 | return result; | 775 | return result; |
169 | 776 | } | 776 | } |
170 | @@ -1042,7 +1042,7 @@ | |||
171 | 1042 | return; | 1042 | return; |
172 | 1043 | } | 1043 | } |
173 | 1044 | 1044 | ||
175 | 1045 | auto const display_area = displays.bounding_rectangle(); | 1045 | auto const display_area = outputs.bounding_rectangle(); |
176 | 1046 | auto const window = window_info.window(); | 1046 | auto const window = window_info.window(); |
177 | 1047 | 1047 | ||
178 | 1048 | auto restore_rect = window_info.restore_rect(); | 1048 | auto restore_rect = window_info.restore_rect(); |
179 | @@ -1450,7 +1450,7 @@ | |||
180 | 1450 | if (!parameters.state().is_set()) | 1450 | if (!parameters.state().is_set()) |
181 | 1451 | parameters.state() = mir_window_state_restored; | 1451 | parameters.state() = mir_window_state_restored; |
182 | 1452 | 1452 | ||
184 | 1453 | auto const active_display_area = active_display(); | 1453 | auto const active_output_area = active_output(); |
185 | 1454 | auto const height = parameters.size().value().height.as_int(); | 1454 | auto const height = parameters.size().value().height.as_int(); |
186 | 1455 | 1455 | ||
187 | 1456 | bool positioned = false; | 1456 | bool positioned = false; |
188 | @@ -1525,35 +1525,35 @@ | |||
189 | 1525 | 1525 | ||
190 | 1526 | if (!positioned) | 1526 | if (!positioned) |
191 | 1527 | { | 1527 | { |
195 | 1528 | auto centred = active_display_area.top_left | 1528 | auto centred = active_output_area.top_left |
196 | 1529 | + 0.5*(as_displacement(active_display_area.size) - as_displacement(parameters.size().value())) | 1529 | + 0.5*(as_displacement(active_output_area.size) - as_displacement(parameters.size().value())) |
197 | 1530 | - DeltaY{(active_display_area.size.height.as_int()-height)/6}; | 1530 | - DeltaY{(active_output_area.size.height.as_int()-height)/6}; |
198 | 1531 | 1531 | ||
199 | 1532 | switch (parameters.state().value()) | 1532 | switch (parameters.state().value()) |
200 | 1533 | { | 1533 | { |
201 | 1534 | case mir_window_state_fullscreen: | 1534 | case mir_window_state_fullscreen: |
202 | 1535 | case mir_window_state_maximized: | 1535 | case mir_window_state_maximized: |
205 | 1536 | parameters.top_left() = active_display_area.top_left; | 1536 | parameters.top_left() = active_output_area.top_left; |
206 | 1537 | parameters.size() = active_display_area.size; | 1537 | parameters.size() = active_output_area.size; |
207 | 1538 | break; | 1538 | break; |
208 | 1539 | 1539 | ||
209 | 1540 | case mir_window_state_vertmaximized: | 1540 | case mir_window_state_vertmaximized: |
211 | 1541 | centred.y = active_display_area.top_left.y; | 1541 | centred.y = active_output_area.top_left.y; |
212 | 1542 | parameters.top_left() = centred; | 1542 | parameters.top_left() = centred; |
214 | 1543 | parameters.size() = Size{parameters.size().value().width, active_display_area.size.height}; | 1543 | parameters.size() = Size{parameters.size().value().width, active_output_area.size.height}; |
215 | 1544 | break; | 1544 | break; |
216 | 1545 | 1545 | ||
217 | 1546 | case mir_window_state_horizmaximized: | 1546 | case mir_window_state_horizmaximized: |
219 | 1547 | centred.x = active_display_area.top_left.x; | 1547 | centred.x = active_output_area.top_left.x; |
220 | 1548 | parameters.top_left() = centred; | 1548 | parameters.top_left() = centred; |
222 | 1549 | parameters.size() = Size{active_display_area.size.width, parameters.size().value().height}; | 1549 | parameters.size() = Size{active_output_area.size.width, parameters.size().value().height}; |
223 | 1550 | break; | 1550 | break; |
224 | 1551 | 1551 | ||
225 | 1552 | default: | 1552 | default: |
226 | 1553 | parameters.top_left() = centred; | 1553 | parameters.top_left() = centred; |
227 | 1554 | } | 1554 | } |
228 | 1555 | 1555 | ||
230 | 1556 | auto const display_area = displays.bounding_rectangle(); | 1556 | auto const display_area = outputs.bounding_rectangle(); |
231 | 1557 | 1557 | ||
232 | 1558 | if (parameters.top_left().value().y < display_area.top_left.y) | 1558 | if (parameters.top_left().value().y < display_area.top_left.y) |
233 | 1559 | parameters.top_left() = Point{parameters.top_left().value().x, display_area.top_left.y}; | 1559 | parameters.top_left() = Point{parameters.top_left().value().x, display_area.top_left.y}; |
234 | @@ -1750,7 +1750,7 @@ | |||
235 | 1750 | -> mir::optional_value<Rectangle> | 1750 | -> mir::optional_value<Rectangle> |
236 | 1751 | { | 1751 | { |
237 | 1752 | auto const hints = parameters.placement_hints().value(); | 1752 | auto const hints = parameters.placement_hints().value(); |
239 | 1753 | auto const active_display_area = active_display(); | 1753 | auto const active_output_area = active_output(); |
240 | 1754 | auto const win_gravity = parameters.window_placement_gravity().value(); | 1754 | auto const win_gravity = parameters.window_placement_gravity().value(); |
241 | 1755 | 1755 | ||
242 | 1756 | if (parameters.size().is_set()) | 1756 | if (parameters.size().is_set()) |
243 | @@ -1775,7 +1775,7 @@ | |||
244 | 1775 | auto result = constrain_to(parent, anchor_for(aux_rect, rect_gravity) + offset) + | 1775 | auto result = constrain_to(parent, anchor_for(aux_rect, rect_gravity) + offset) + |
245 | 1776 | offset_for(size, win_gravity); | 1776 | offset_for(size, win_gravity); |
246 | 1777 | 1777 | ||
248 | 1778 | if (active_display_area.contains(Rectangle{result, size})) | 1778 | if (active_output_area.contains(Rectangle{result, size})) |
249 | 1779 | return Rectangle{result, size}; | 1779 | return Rectangle{result, size}; |
250 | 1780 | 1780 | ||
251 | 1781 | if (!default_result.is_set()) | 1781 | if (!default_result.is_set()) |
252 | @@ -1787,7 +1787,7 @@ | |||
253 | 1787 | auto result = constrain_to(parent, anchor_for(aux_rect, flip_x(rect_gravity)) + flip_x(offset)) + | 1787 | auto result = constrain_to(parent, anchor_for(aux_rect, flip_x(rect_gravity)) + flip_x(offset)) + |
254 | 1788 | offset_for(size, flip_x(win_gravity)); | 1788 | offset_for(size, flip_x(win_gravity)); |
255 | 1789 | 1789 | ||
257 | 1790 | if (active_display_area.contains(Rectangle{result, size})) | 1790 | if (active_output_area.contains(Rectangle{result, size})) |
258 | 1791 | return Rectangle{result, size}; | 1791 | return Rectangle{result, size}; |
259 | 1792 | } | 1792 | } |
260 | 1793 | 1793 | ||
261 | @@ -1796,7 +1796,7 @@ | |||
262 | 1796 | auto result = constrain_to(parent, anchor_for(aux_rect, flip_y(rect_gravity)) + flip_y(offset)) + | 1796 | auto result = constrain_to(parent, anchor_for(aux_rect, flip_y(rect_gravity)) + flip_y(offset)) + |
263 | 1797 | offset_for(size, flip_y(win_gravity)); | 1797 | offset_for(size, flip_y(win_gravity)); |
264 | 1798 | 1798 | ||
266 | 1799 | if (active_display_area.contains(Rectangle{result, size})) | 1799 | if (active_output_area.contains(Rectangle{result, size})) |
267 | 1800 | return Rectangle{result, size}; | 1800 | return Rectangle{result, size}; |
268 | 1801 | } | 1801 | } |
269 | 1802 | 1802 | ||
270 | @@ -1805,7 +1805,7 @@ | |||
271 | 1805 | auto result = constrain_to(parent, anchor_for(aux_rect, flip_x(flip_y(rect_gravity))) + flip_x(flip_y(offset))) + | 1805 | auto result = constrain_to(parent, anchor_for(aux_rect, flip_x(flip_y(rect_gravity))) + flip_x(flip_y(offset))) + |
272 | 1806 | offset_for(size, flip_x(flip_y(win_gravity))); | 1806 | offset_for(size, flip_x(flip_y(win_gravity))); |
273 | 1807 | 1807 | ||
275 | 1808 | if (active_display_area.contains(Rectangle{result, size})) | 1808 | if (active_output_area.contains(Rectangle{result, size})) |
276 | 1809 | return Rectangle{result, size}; | 1809 | return Rectangle{result, size}; |
277 | 1810 | } | 1810 | } |
278 | 1811 | } | 1811 | } |
279 | @@ -1817,8 +1817,8 @@ | |||
280 | 1817 | 1817 | ||
281 | 1818 | if (hints & mir_placement_hints_slide_x) | 1818 | if (hints & mir_placement_hints_slide_x) |
282 | 1819 | { | 1819 | { |
285 | 1820 | auto const left_overhang = result.x - active_display_area.top_left.x; | 1820 | auto const left_overhang = result.x - active_output_area.top_left.x; |
286 | 1821 | auto const right_overhang = (result + as_displacement(size)).x - active_display_area.top_right().x; | 1821 | auto const right_overhang = (result + as_displacement(size)).x - active_output_area.top_right().x; |
287 | 1822 | 1822 | ||
288 | 1823 | if (left_overhang < DeltaX{0}) | 1823 | if (left_overhang < DeltaX{0}) |
289 | 1824 | result -= left_overhang; | 1824 | result -= left_overhang; |
290 | @@ -1828,8 +1828,8 @@ | |||
291 | 1828 | 1828 | ||
292 | 1829 | if (hints & mir_placement_hints_slide_y) | 1829 | if (hints & mir_placement_hints_slide_y) |
293 | 1830 | { | 1830 | { |
296 | 1831 | auto const top_overhang = result.y - active_display_area.top_left.y; | 1831 | auto const top_overhang = result.y - active_output_area.top_left.y; |
297 | 1832 | auto const bot_overhang = (result + as_displacement(size)).y - active_display_area.bottom_left().y; | 1832 | auto const bot_overhang = (result + as_displacement(size)).y - active_output_area.bottom_left().y; |
298 | 1833 | 1833 | ||
299 | 1834 | if (top_overhang < DeltaY{0}) | 1834 | if (top_overhang < DeltaY{0}) |
300 | 1835 | result -= top_overhang; | 1835 | result -= top_overhang; |
301 | @@ -1837,7 +1837,7 @@ | |||
302 | 1837 | result -= bot_overhang; | 1837 | result -= bot_overhang; |
303 | 1838 | } | 1838 | } |
304 | 1839 | 1839 | ||
306 | 1840 | if (active_display_area.contains(Rectangle{result, size})) | 1840 | if (active_output_area.contains(Rectangle{result, size})) |
307 | 1841 | return Rectangle{result, size}; | 1841 | return Rectangle{result, size}; |
308 | 1842 | } | 1842 | } |
309 | 1843 | 1843 | ||
310 | @@ -1848,8 +1848,8 @@ | |||
311 | 1848 | 1848 | ||
312 | 1849 | if (hints & mir_placement_hints_resize_x) | 1849 | if (hints & mir_placement_hints_resize_x) |
313 | 1850 | { | 1850 | { |
316 | 1851 | auto const left_overhang = result.x - active_display_area.top_left.x; | 1851 | auto const left_overhang = result.x - active_output_area.top_left.x; |
317 | 1852 | auto const right_overhang = (result + as_displacement(size)).x - active_display_area.top_right().x; | 1852 | auto const right_overhang = (result + as_displacement(size)).x - active_output_area.top_right().x; |
318 | 1853 | 1853 | ||
319 | 1854 | if (left_overhang < DeltaX{0}) | 1854 | if (left_overhang < DeltaX{0}) |
320 | 1855 | { | 1855 | { |
321 | @@ -1865,8 +1865,8 @@ | |||
322 | 1865 | 1865 | ||
323 | 1866 | if (hints & mir_placement_hints_resize_y) | 1866 | if (hints & mir_placement_hints_resize_y) |
324 | 1867 | { | 1867 | { |
327 | 1868 | auto const top_overhang = result.y - active_display_area.top_left.y; | 1868 | auto const top_overhang = result.y - active_output_area.top_left.y; |
328 | 1869 | auto const bot_overhang = (result + as_displacement(size)).y - active_display_area.bottom_left().y; | 1869 | auto const bot_overhang = (result + as_displacement(size)).y - active_output_area.bottom_left().y; |
329 | 1870 | 1870 | ||
330 | 1871 | if (top_overhang < DeltaY{0}) | 1871 | if (top_overhang < DeltaY{0}) |
331 | 1872 | { | 1872 | { |
332 | @@ -1880,7 +1880,7 @@ | |||
333 | 1880 | } | 1880 | } |
334 | 1881 | } | 1881 | } |
335 | 1882 | 1882 | ||
337 | 1883 | if (active_display_area.contains(Rectangle{result, size})) | 1883 | if (active_output_area.contains(Rectangle{result, size})) |
338 | 1884 | return Rectangle{result, size}; | 1884 | return Rectangle{result, size}; |
339 | 1885 | } | 1885 | } |
340 | 1886 | 1886 | ||
341 | @@ -2149,7 +2149,7 @@ | |||
342 | 2149 | void miral::BasicWindowManager::add_display_for_testing(mir::geometry::Rectangle const& area) | 2149 | void miral::BasicWindowManager::add_display_for_testing(mir::geometry::Rectangle const& area) |
343 | 2150 | { | 2150 | { |
344 | 2151 | Locker lock{this}; | 2151 | Locker lock{this}; |
346 | 2152 | displays.add(area); | 2152 | outputs.add(area); |
347 | 2153 | 2153 | ||
348 | 2154 | update_windows_for_outputs(); | 2154 | update_windows_for_outputs(); |
349 | 2155 | } | 2155 | } |
350 | @@ -2157,7 +2157,7 @@ | |||
351 | 2157 | void miral::BasicWindowManager::advise_output_create(miral::Output const& output) | 2157 | void miral::BasicWindowManager::advise_output_create(miral::Output const& output) |
352 | 2158 | { | 2158 | { |
353 | 2159 | Locker lock{this}; | 2159 | Locker lock{this}; |
355 | 2160 | displays.add(output.extents()); | 2160 | outputs.add(output.extents()); |
356 | 2161 | 2161 | ||
357 | 2162 | update_windows_for_outputs(); | 2162 | update_windows_for_outputs(); |
358 | 2163 | } | 2163 | } |
359 | @@ -2165,8 +2165,8 @@ | |||
360 | 2165 | void miral::BasicWindowManager::advise_output_update(miral::Output const& updated, miral::Output const& original) | 2165 | void miral::BasicWindowManager::advise_output_update(miral::Output const& updated, miral::Output const& original) |
361 | 2166 | { | 2166 | { |
362 | 2167 | Locker lock{this}; | 2167 | Locker lock{this}; |
365 | 2168 | displays.remove(original.extents()); | 2168 | outputs.remove(original.extents()); |
366 | 2169 | displays.add(updated.extents()); | 2169 | outputs.add(updated.extents()); |
367 | 2170 | 2170 | ||
368 | 2171 | update_windows_for_outputs(); | 2171 | update_windows_for_outputs(); |
369 | 2172 | } | 2172 | } |
370 | @@ -2174,7 +2174,7 @@ | |||
371 | 2174 | void miral::BasicWindowManager::advise_output_delete(miral::Output const& output) | 2174 | void miral::BasicWindowManager::advise_output_delete(miral::Output const& output) |
372 | 2175 | { | 2175 | { |
373 | 2176 | Locker lock{this}; | 2176 | Locker lock{this}; |
375 | 2177 | displays.remove(output.extents()); | 2177 | outputs.remove(output.extents()); |
376 | 2178 | 2178 | ||
377 | 2179 | update_windows_for_outputs(); | 2179 | update_windows_for_outputs(); |
378 | 2180 | } | 2180 | } |
379 | @@ -2192,10 +2192,10 @@ | |||
380 | 2192 | } | 2192 | } |
381 | 2193 | } | 2193 | } |
382 | 2194 | 2194 | ||
384 | 2195 | if (displays.size() == 0) | 2195 | if (outputs.size() == 0) |
385 | 2196 | return; | 2196 | return; |
386 | 2197 | 2197 | ||
388 | 2198 | auto const display_area = displays.bounding_rectangle(); | 2198 | auto const display_area = outputs.bounding_rectangle(); |
389 | 2199 | 2199 | ||
390 | 2200 | for (auto const& window : maximized_surfaces) | 2200 | for (auto const& window : maximized_surfaces) |
391 | 2201 | { | 2201 | { |
392 | 2202 | 2202 | ||
393 | === modified file 'miral/basic_window_manager.h' | |||
394 | --- miral/basic_window_manager.h 2017-07-28 08:54:30 +0000 | |||
395 | +++ miral/basic_window_manager.h 2017-07-28 13:57:06 +0000 | |||
396 | @@ -176,7 +176,7 @@ | |||
397 | 176 | 176 | ||
398 | 177 | auto window_at(mir::geometry::Point cursor) const -> Window override; | 177 | auto window_at(mir::geometry::Point cursor) const -> Window override; |
399 | 178 | 178 | ||
401 | 179 | auto active_display() -> mir::geometry::Rectangle const override; | 179 | auto active_output() -> mir::geometry::Rectangle const override; |
402 | 180 | 180 | ||
403 | 181 | void raise_tree(Window const& root) override; | 181 | void raise_tree(Window const& root) override; |
404 | 182 | void start_drag_and_drop(WindowInfo& window_info, std::vector<uint8_t> const& handle) override; | 182 | void start_drag_and_drop(WindowInfo& window_info, std::vector<uint8_t> const& handle) override; |
405 | @@ -216,7 +216,7 @@ | |||
406 | 216 | std::mutex mutex; | 216 | std::mutex mutex; |
407 | 217 | SessionInfoMap app_info; | 217 | SessionInfoMap app_info; |
408 | 218 | SurfaceInfoMap window_info; | 218 | SurfaceInfoMap window_info; |
410 | 219 | mir::geometry::Rectangles displays; | 219 | mir::geometry::Rectangles outputs; |
411 | 220 | mir::geometry::Point cursor; | 220 | mir::geometry::Point cursor; |
412 | 221 | uint64_t last_input_event_timestamp{0}; | 221 | uint64_t last_input_event_timestamp{0}; |
413 | 222 | #if MIR_SERVER_VERSION >= MIR_VERSION_NUMBER(0, 27, 0) | 222 | #if MIR_SERVER_VERSION >= MIR_VERSION_NUMBER(0, 27, 0) |
414 | 223 | 223 | ||
415 | === modified file 'miral/symbols.map' | |||
416 | --- miral/symbols.map 2017-07-26 10:44:19 +0000 | |||
417 | +++ miral/symbols.map 2017-07-28 13:57:06 +0000 | |||
418 | @@ -429,6 +429,7 @@ | |||
419 | 429 | miral::WindowManagementPolicyAddendum3::?WindowManagementPolicyAddendum3*; | 429 | miral::WindowManagementPolicyAddendum3::?WindowManagementPolicyAddendum3*; |
420 | 430 | miral::WindowManagementPolicyAddendum3::WindowManagementPolicyAddendum3*; | 430 | miral::WindowManagementPolicyAddendum3::WindowManagementPolicyAddendum3*; |
421 | 431 | miral::WindowManagementPolicyAddendum3::operator*; | 431 | miral::WindowManagementPolicyAddendum3::operator*; |
422 | 432 | miral::WindowManagerTools::active_output*; | ||
423 | 432 | non-virtual?thunk?to?miral::WindowManagementPolicyAddendum3::?WindowManagementPolicyAddendum3*; | 433 | non-virtual?thunk?to?miral::WindowManagementPolicyAddendum3::?WindowManagementPolicyAddendum3*; |
424 | 433 | typeinfo?for?miral::WindowManagementPolicyAddendum3; | 434 | typeinfo?for?miral::WindowManagementPolicyAddendum3; |
425 | 434 | vtable?for?miral::WindowManagementPolicyAddendum3; | 435 | vtable?for?miral::WindowManagementPolicyAddendum3; |
426 | 435 | 436 | ||
427 | === modified file 'miral/window_management_trace.cpp' | |||
428 | --- miral/window_management_trace.cpp 2017-03-21 17:55:31 +0000 | |||
429 | +++ miral/window_management_trace.cpp 2017-07-28 13:57:06 +0000 | |||
430 | @@ -448,10 +448,10 @@ | |||
431 | 448 | } | 448 | } |
432 | 449 | MIRAL_TRACE_EXCEPTION | 449 | MIRAL_TRACE_EXCEPTION |
433 | 450 | 450 | ||
435 | 451 | auto miral::WindowManagementTrace::active_display() -> mir::geometry::Rectangle const | 451 | auto miral::WindowManagementTrace::active_output() -> mir::geometry::Rectangle const |
436 | 452 | try { | 452 | try { |
437 | 453 | log_input(); | 453 | log_input(); |
439 | 454 | auto result = wrapped.active_display(); | 454 | auto result = wrapped.active_output(); |
440 | 455 | std::stringstream out; | 455 | std::stringstream out; |
441 | 456 | out << result; | 456 | out << result; |
442 | 457 | mir::log_info("%s -> ", __func__, out.str().c_str()); | 457 | mir::log_info("%s -> ", __func__, out.str().c_str()); |
443 | 458 | 458 | ||
444 | === modified file 'miral/window_management_trace.h' | |||
445 | --- miral/window_management_trace.h 2017-03-21 17:55:31 +0000 | |||
446 | +++ miral/window_management_trace.h 2017-07-28 13:57:06 +0000 | |||
447 | @@ -54,7 +54,7 @@ | |||
448 | 54 | virtual auto active_window() const -> Window override; | 54 | virtual auto active_window() const -> Window override; |
449 | 55 | virtual auto select_active_window(Window const& hint) -> Window override; | 55 | virtual auto select_active_window(Window const& hint) -> Window override; |
450 | 56 | virtual auto window_at(mir::geometry::Point cursor) const -> Window override; | 56 | virtual auto window_at(mir::geometry::Point cursor) const -> Window override; |
452 | 57 | virtual auto active_display() -> mir::geometry::Rectangle const override; | 57 | virtual auto active_output() -> mir::geometry::Rectangle const override; |
453 | 58 | virtual auto info_for_window_id(std::string const& id) const -> WindowInfo& override; | 58 | virtual auto info_for_window_id(std::string const& id) const -> WindowInfo& override; |
454 | 59 | virtual auto id_for_window(Window const& window) const -> std::string override; | 59 | virtual auto id_for_window(Window const& window) const -> std::string override; |
455 | 60 | virtual void place_and_size_for_state(WindowSpecification& modifications, WindowInfo const& window_info) const override; | 60 | virtual void place_and_size_for_state(WindowSpecification& modifications, WindowInfo const& window_info) const override; |
456 | 61 | 61 | ||
457 | === modified file 'miral/window_manager_tools.cpp' | |||
458 | --- miral/window_manager_tools.cpp 2017-03-21 17:55:31 +0000 | |||
459 | +++ miral/window_manager_tools.cpp 2017-07-28 13:57:06 +0000 | |||
460 | @@ -18,6 +18,7 @@ | |||
461 | 18 | 18 | ||
462 | 19 | #include "miral/window_manager_tools.h" | 19 | #include "miral/window_manager_tools.h" |
463 | 20 | #include "window_manager_tools_implementation.h" | 20 | #include "window_manager_tools_implementation.h" |
464 | 21 | #include "both_versions.h" | ||
465 | 21 | 22 | ||
466 | 22 | miral::WindowManagerTools::WindowManagerTools(WindowManagerToolsImplementation* tools) : | 23 | miral::WindowManagerTools::WindowManagerTools(WindowManagerToolsImplementation* tools) : |
467 | 23 | tools{tools} | 24 | tools{tools} |
468 | @@ -77,8 +78,11 @@ | |||
469 | 77 | auto miral::WindowManagerTools::window_at(mir::geometry::Point cursor) const -> Window | 78 | auto miral::WindowManagerTools::window_at(mir::geometry::Point cursor) const -> Window |
470 | 78 | { return tools->window_at(cursor); } | 79 | { return tools->window_at(cursor); } |
471 | 79 | 80 | ||
474 | 80 | auto miral::WindowManagerTools::active_display() -> mir::geometry::Rectangle const | 81 | MIRAL_FAKE_OLD_SYMBOL( |
475 | 81 | { return tools->active_display(); } | 82 | _ZN5miral18WindowManagerTools14active_displayEv, |
476 | 83 | _ZN5miral18WindowManagerTools13active_outputEv) | ||
477 | 84 | auto miral::WindowManagerTools::active_output() -> mir::geometry::Rectangle const | ||
478 | 85 | { return tools->active_output(); } | ||
479 | 82 | 86 | ||
480 | 83 | void miral::WindowManagerTools::raise_tree(Window const& root) | 87 | void miral::WindowManagerTools::raise_tree(Window const& root) |
481 | 84 | { tools->raise_tree(root); } | 88 | { tools->raise_tree(root); } |
482 | 85 | 89 | ||
483 | === modified file 'miral/window_manager_tools_implementation.h' | |||
484 | --- miral/window_manager_tools_implementation.h 2017-03-21 17:55:31 +0000 | |||
485 | +++ miral/window_manager_tools_implementation.h 2017-07-28 13:57:06 +0000 | |||
486 | @@ -65,7 +65,7 @@ | |||
487 | 65 | virtual void focus_next_within_application() = 0; | 65 | virtual void focus_next_within_application() = 0; |
488 | 66 | virtual void focus_prev_within_application() = 0; | 66 | virtual void focus_prev_within_application() = 0; |
489 | 67 | virtual auto window_at(mir::geometry::Point cursor) const -> Window = 0; | 67 | virtual auto window_at(mir::geometry::Point cursor) const -> Window = 0; |
491 | 68 | virtual auto active_display() -> mir::geometry::Rectangle const = 0; | 68 | virtual auto active_output() -> mir::geometry::Rectangle const = 0; |
492 | 69 | virtual void raise_tree(Window const& root) = 0; | 69 | virtual void raise_tree(Window const& root) = 0; |
493 | 70 | virtual void start_drag_and_drop(WindowInfo& window_info, std::vector<uint8_t> const& handle) = 0; | 70 | virtual void start_drag_and_drop(WindowInfo& window_info, std::vector<uint8_t> const& handle) = 0; |
494 | 71 | virtual void end_drag_and_drop() = 0; | 71 | virtual void end_drag_and_drop() = 0; |
PASSED: Continuous integration, rev:573 /mir-jenkins. ubuntu. com/job/ miral-ci/ 58/ /mir-jenkins. ubuntu. com/job/ build-miral/ 90 /mir-jenkins. ubuntu. com/job/ build-0- fetch/5009 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= artful/ 4998 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial/ 4998 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= zesty/4998 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= amd64,release= artful/ 94 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= amd64,release= artful/ 94/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= amd64,release= xenial/ 94 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= amd64,release= xenial/ 94/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= amd64,release= zesty/94 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= amd64,release= zesty/94/ artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= i386,release= artful/ 94 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= i386,release= artful/ 94/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= i386,release= xenial/ 94 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= i386,release= xenial/ 94/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= i386,release= zesty/94 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- miral/arch= i386,release= zesty/94/ artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ miral-ci/ 58/rebuild
https:/