Merge lp:~alan-griffiths/miral/fix-1633052 into lp:miral

Proposed by Alan Griffiths
Status: Merged
Approved by: Gerry Boland
Approved revision: 409
Merged at revision: 409
Proposed branch: lp:~alan-griffiths/miral/fix-1633052
Merge into: lp:miral
Diff against target: 20 lines (+10/-0)
1 file modified
miral/window_specification.cpp (+10/-0)
To merge this branch: bzr merge lp:~alan-griffiths/miral/fix-1633052
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Review via email: mp+308397@code.launchpad.net

Commit message

Prior to Mir-0.25 mir_connection_create_spec_for_tooltip() doesn't set an edge attachment preference. So give it one. (LP: #1633052)

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote :

Works!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'miral/window_specification.cpp'
2--- miral/window_specification.cpp 2016-10-11 14:16:16 +0000
3+++ miral/window_specification.cpp 2016-10-13 15:47:22 +0000
4@@ -101,6 +101,16 @@
5 aux_rect_placement_offset = Displacement{spec.aux_rect_placement_offset_x.value(), spec.aux_rect_placement_offset_y.value()};
6 #endif
7
8+#if MIR_SERVER_VERSION < MIR_VERSION_NUMBER(0, 25, 0)
9+ // mir_connection_create_spec_for_tooltip() didn't set an edge_attachment preference
10+ if (aux_rect.is_set() && !spec.edge_attachment.is_set())
11+ {
12+ window_placement_gravity = mir_placement_gravity_northwest;
13+ aux_rect_placement_gravity = mir_placement_gravity_northeast;
14+ placement_hints = mir_placement_hints_flip_any;
15+ }
16+#endif
17+
18 if (spec.edge_attachment.is_set() && !placement_hints.is_set())
19 {
20 switch (spec.edge_attachment.value())

Subscribers

People subscribed via source and target branches