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

Proposed by Lukáš Tinkl
Status: Merged
Approved by: Alan Griffiths
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 Approve
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.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

A test would be nice

Revision history for this message
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

update the symbols

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Symbols updated

Revision history for this message
Alan Griffiths (alan-griffiths) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/libmiral2.symbols'
--- debian/libmiral2.symbols 2017-02-02 17:30:41 +0000
+++ debian/libmiral2.symbols 2017-02-03 14:27:51 +0000
@@ -1,5 +1,7 @@
1libmiral.so.2 libmiral2 #MINVER#1libmiral.so.2 libmiral2 #MINVER#
2 MIRAL_1.0@MIRAL_1.0 1.0.02 MIRAL_1.0@MIRAL_1.0 1.0.0
3 (c++)"miral::WindowInfo::shell_chrome(MirShellChrome)@MIRAL_1.2" 1.2.0
4 (c++)"miral::WindowInfo::shell_chrome() const@MIRAL_1.2" 1.2.0
3 (c++)"miral::WindowInfo::height_inc(mir::geometry::detail::IntWrapper<mir::geometry::DeltaYTag>)@MIRAL_1.0" 1.0.05 (c++)"miral::WindowInfo::height_inc(mir::geometry::detail::IntWrapper<mir::geometry::DeltaYTag>)@MIRAL_1.0" 1.0.0
4 (c++)"miral::WindowInfo::max_aspect(miral::WindowSpecification::AspectRatio)@MIRAL_1.0" 1.0.06 (c++)"miral::WindowInfo::max_aspect(miral::WindowSpecification::AspectRatio)@MIRAL_1.0" 1.0.0
5 (c++)"miral::WindowInfo::max_height(mir::geometry::detail::IntWrapper<mir::geometry::HeightTag>)@MIRAL_1.0" 1.0.07 (c++)"miral::WindowInfo::max_height(mir::geometry::detail::IntWrapper<mir::geometry::HeightTag>)@MIRAL_1.0" 1.0.0
68
=== modified file 'include/miral/window_info.h'
--- include/miral/window_info.h 2017-01-13 18:17:01 +0000
+++ include/miral/window_info.h 2017-02-03 14:27:51 +0000
@@ -108,6 +108,9 @@
108 auto confine_pointer() const -> MirPointerConfinementState;108 auto confine_pointer() const -> MirPointerConfinementState;
109 void confine_pointer(MirPointerConfinementState confinement);109 void confine_pointer(MirPointerConfinementState confinement);
110110
111 auto shell_chrome() const -> MirShellChrome;
112 void shell_chrome(MirShellChrome chrome);
113
111 /// This can be used by client code to store window manager specific information114 /// This can be used by client code to store window manager specific information
112 auto userdata() const -> std::shared_ptr<void>;115 auto userdata() const -> std::shared_ptr<void>;
113 void userdata(std::shared_ptr<void> userdata);116 void userdata(std::shared_ptr<void> userdata);
114117
=== modified file 'miral/symbols.map'
--- miral/symbols.map 2017-02-02 17:30:41 +0000
+++ miral/symbols.map 2017-02-03 14:27:51 +0000
@@ -353,6 +353,7 @@
353MIRAL_1.2 {353MIRAL_1.2 {
354global:354global:
355 extern "C++" {355 extern "C++" {
356 miral::WindowInfo::shell_chrome*;
356 miral::WindowManagerTools::drag_window*;357 miral::WindowManagerTools::drag_window*;
357 };358 };
358} MIRAL_1.1;359} MIRAL_1.1;
359360
=== modified file 'miral/window_info.cpp'
--- miral/window_info.cpp 2017-02-02 13:03:58 +0000
+++ miral/window_info.cpp 2017-02-03 14:27:51 +0000
@@ -61,6 +61,7 @@
61 AspectRatio min_aspect;61 AspectRatio min_aspect;
62 AspectRatio max_aspect;62 AspectRatio max_aspect;
63 mir::optional_value<int> output_id;63 mir::optional_value<int> output_id;
64 MirShellChrome shell_chrome;
64 std::shared_ptr<void> userdata;65 std::shared_ptr<void> userdata;
65};66};
6667
@@ -79,7 +80,8 @@
79 width_inc{optional_value_or_default(params.width_inc(), DeltaX{1})},80 width_inc{optional_value_or_default(params.width_inc(), DeltaX{1})},
80 height_inc{optional_value_or_default(params.height_inc(), DeltaY{1})},81 height_inc{optional_value_or_default(params.height_inc(), DeltaY{1})},
81 min_aspect(optional_value_or_default(params.min_aspect(), AspectRatio{0U, std::numeric_limits<unsigned>::max()})),82 min_aspect(optional_value_or_default(params.min_aspect(), AspectRatio{0U, std::numeric_limits<unsigned>::max()})),
82 max_aspect(optional_value_or_default(params.max_aspect(), AspectRatio{std::numeric_limits<unsigned>::max(), 0U}))83 max_aspect(optional_value_or_default(params.max_aspect(), AspectRatio{std::numeric_limits<unsigned>::max(), 0U})),
84 shell_chrome(optional_value_or_default(params.shell_chrome(), mir_shell_chrome_normal))
83{85{
84 if (params.output_id().is_set())86 if (params.output_id().is_set())
85 output_id = params.output_id().value();87 output_id = params.output_id().value();
@@ -91,7 +93,8 @@
91miral::WindowInfo::Self::Self() :93miral::WindowInfo::Self::Self() :
92 type{mir_window_type_normal},94 type{mir_window_type_normal},
93 state{mir_window_state_unknown},95 state{mir_window_state_unknown},
94 preferred_orientation{mir_orientation_mode_any}96 preferred_orientation{mir_orientation_mode_any},
97 shell_chrome{mir_shell_chrome_normal}
95{98{
96}99}
97100
@@ -570,6 +573,16 @@
570 self->confine_pointer = confinement;573 self->confine_pointer = confinement;
571}574}
572575
576auto miral::WindowInfo::shell_chrome() const -> MirShellChrome
577{
578 return self->shell_chrome;
579}
580
581void miral::WindowInfo::shell_chrome(MirShellChrome chrome)
582{
583 self->shell_chrome = chrome;
584}
585
573auto miral::WindowInfo::name() const -> std::string586auto miral::WindowInfo::name() const -> std::string
574{587{
575 return self->name;588 return self->name;

Subscribers

People subscribed via source and target branches