Merge lp:~lukas-kde/miral/shellchrome-windowinfo into lp:miral

Proposed by Lukáš Tinkl on 2017-02-03
Status: Merged
Approved by: Alan Griffiths on 2017-02-07
Approved revision: 503
Merged at revision: 503
Proposed branch: lp:~lukas-kde/miral/shellchrome-windowinfo
Merge into: lp:miral
Diff against target: 86 lines (+21/-2)
4 files modified
debian/libmiral2.symbols (+2/-0)
include/miral/window_info.h (+3/-0)
miral/symbols.map (+1/-0)
miral/window_info.cpp (+15/-2)
To merge this branch: bzr merge lp:~lukas-kde/miral/shellchrome-windowinfo
Reviewer Review Type Date Requested Status
Alan Griffiths 2017-02-03 Approve on 2017-02-07
Review via email: mp+316331@code.launchpad.net

Commit message

Add accessors for shell_chrome to WindowInfo

Description of the change

Add accessors for shell_chrome to WindowInfo

Needed for lp:1658117

To post a comment you must log in.
Alan Griffiths (alan-griffiths) wrote :

A test would be nice

Alan Griffiths (alan-griffiths) wrote :

If you had written a test you'd find these symbols are not exported.

Running "make symbols" will update the symbols.map and "make check-symbols" will check debian/libmiral2.symbols

review: Needs Fixing
503. By Lukáš Tinkl on 2017-02-03

update the symbols

Lukáš Tinkl (lukas-kde) wrote :

Symbols updated

review: Approve

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-02-02 17:30:41 +0000
3+++ debian/libmiral2.symbols 2017-02-03 14:27:51 +0000
4@@ -1,5 +1,7 @@
5 libmiral.so.2 libmiral2 #MINVER#
6 MIRAL_1.0@MIRAL_1.0 1.0.0
7+ (c++)"miral::WindowInfo::shell_chrome(MirShellChrome)@MIRAL_1.2" 1.2.0
8+ (c++)"miral::WindowInfo::shell_chrome() const@MIRAL_1.2" 1.2.0
9 (c++)"miral::WindowInfo::height_inc(mir::geometry::detail::IntWrapper<mir::geometry::DeltaYTag>)@MIRAL_1.0" 1.0.0
10 (c++)"miral::WindowInfo::max_aspect(miral::WindowSpecification::AspectRatio)@MIRAL_1.0" 1.0.0
11 (c++)"miral::WindowInfo::max_height(mir::geometry::detail::IntWrapper<mir::geometry::HeightTag>)@MIRAL_1.0" 1.0.0
12
13=== modified file 'include/miral/window_info.h'
14--- include/miral/window_info.h 2017-01-13 18:17:01 +0000
15+++ include/miral/window_info.h 2017-02-03 14:27:51 +0000
16@@ -108,6 +108,9 @@
17 auto confine_pointer() const -> MirPointerConfinementState;
18 void confine_pointer(MirPointerConfinementState confinement);
19
20+ auto shell_chrome() const -> MirShellChrome;
21+ void shell_chrome(MirShellChrome chrome);
22+
23 /// This can be used by client code to store window manager specific information
24 auto userdata() const -> std::shared_ptr<void>;
25 void userdata(std::shared_ptr<void> userdata);
26
27=== modified file 'miral/symbols.map'
28--- miral/symbols.map 2017-02-02 17:30:41 +0000
29+++ miral/symbols.map 2017-02-03 14:27:51 +0000
30@@ -353,6 +353,7 @@
31 MIRAL_1.2 {
32 global:
33 extern "C++" {
34+ miral::WindowInfo::shell_chrome*;
35 miral::WindowManagerTools::drag_window*;
36 };
37 } MIRAL_1.1;
38
39=== modified file 'miral/window_info.cpp'
40--- miral/window_info.cpp 2017-02-02 13:03:58 +0000
41+++ miral/window_info.cpp 2017-02-03 14:27:51 +0000
42@@ -61,6 +61,7 @@
43 AspectRatio min_aspect;
44 AspectRatio max_aspect;
45 mir::optional_value<int> output_id;
46+ MirShellChrome shell_chrome;
47 std::shared_ptr<void> userdata;
48 };
49
50@@ -79,7 +80,8 @@
51 width_inc{optional_value_or_default(params.width_inc(), DeltaX{1})},
52 height_inc{optional_value_or_default(params.height_inc(), DeltaY{1})},
53 min_aspect(optional_value_or_default(params.min_aspect(), AspectRatio{0U, std::numeric_limits<unsigned>::max()})),
54- max_aspect(optional_value_or_default(params.max_aspect(), AspectRatio{std::numeric_limits<unsigned>::max(), 0U}))
55+ max_aspect(optional_value_or_default(params.max_aspect(), AspectRatio{std::numeric_limits<unsigned>::max(), 0U})),
56+ shell_chrome(optional_value_or_default(params.shell_chrome(), mir_shell_chrome_normal))
57 {
58 if (params.output_id().is_set())
59 output_id = params.output_id().value();
60@@ -91,7 +93,8 @@
61 miral::WindowInfo::Self::Self() :
62 type{mir_window_type_normal},
63 state{mir_window_state_unknown},
64- preferred_orientation{mir_orientation_mode_any}
65+ preferred_orientation{mir_orientation_mode_any},
66+ shell_chrome{mir_shell_chrome_normal}
67 {
68 }
69
70@@ -570,6 +573,16 @@
71 self->confine_pointer = confinement;
72 }
73
74+auto miral::WindowInfo::shell_chrome() const -> MirShellChrome
75+{
76+ return self->shell_chrome;
77+}
78+
79+void miral::WindowInfo::shell_chrome(MirShellChrome chrome)
80+{
81+ self->shell_chrome = chrome;
82+}
83+
84 auto miral::WindowInfo::name() const -> std::string
85 {
86 return self->name;

Subscribers

People subscribed via source and target branches