19 #ifndef MIR_SHELL_CANONICAL_WINDOW_MANAGER_H_
20 #define MIR_SHELL_CANONICAL_WINDOW_MANAGER_H_
40 std::shared_ptr<scene::Session>
const&
session,
41 std::shared_ptr<scene::Surface>
const& surface,
52 std::shared_ptr<scene::Surface>
const& surface,
55 const bool left_resize,
56 const bool top_resize,
63 std::weak_ptr<scene::Surface>
parent;
64 std::vector<std::weak_ptr<scene::Surface>>
children;
92 std::shared_ptr<shell::DisplayLayout>
const& display_layout);
103 std::shared_ptr<scene::Session>
const& session,
107 void handle_new_surface(std::shared_ptr<scene::Session>
const& session, std::shared_ptr<scene::Surface>
const& surface);
110 std::shared_ptr<scene::Session>
const& session,
111 std::shared_ptr<scene::Surface>
const& surface,
114 void handle_delete_surface(std::shared_ptr<scene::Session>
const& session, std::weak_ptr<scene::Surface>
const& surface);
127 std::shared_ptr<scene::Session>
const& session, std::shared_ptr<scene::Surface>
const& surface);
130 static const int modifier_mask =
141 void select_active_surface(std::shared_ptr<scene::Surface>
const& surface);
142 auto active_surface() const ->
std::shared_ptr<scene::Surface>;
144 bool resize(
std::shared_ptr<scene::Surface> const& surface, geometry::Point cursor, geometry::Point old_cursor, geometry::Rectangle bounds);
145 bool drag(
std::shared_ptr<scene::Surface> surface, geometry::Point to, geometry::Point from, geometry::Rectangle bounds);
146 void move_tree(
std::shared_ptr<scene::Surface> const& root, geometry::Displacement movement) const;
147 void raise_tree(
std::shared_ptr<scene::Surface> const& root) const;
149 std::shared_ptr<
mir::scene::Surface> const& surface,
150 geometry::Point const& new_pos,
151 geometry::Size const& new_size) const;
156 geometry::Rectangle display_area;
157 geometry::Point old_cursor{};
158 std::weak_ptr<scene::Surface> active_surface_;
geometry::Height min_height
Definition: canonical_window_manager.h:66
All things Mir.
Definition: atomic_callback.h:25
Interface to the layout of the display outputs.
Definition: display_layout.h:36
void constrain_resize(std::shared_ptr< scene::Surface > const &surface, geometry::Point &requested_pos, geometry::Size &requested_size, const bool left_resize, const bool top_resize, geometry::Rectangle const &bounds) const
Definition: canonical_window_manager.cpp:858
typename SessionTo< CanonicalSessionInfo >::type CanonicalSessionInfoMap
Definition: canonical_window_manager.h:87
void handle_delete_surface(std::shared_ptr< scene::Session > const &session, std::weak_ptr< scene::Surface > const &surface)
Definition: canonical_window_manager.cpp:492
Definition: canonical_window_manager.h:32
std::vector< std::shared_ptr< scene::Surface > > generate_decorations_for(std::shared_ptr< scene::Session > const &session, std::shared_ptr< scene::Surface > const &surface)
A collection of rectangles (with possible duplicates).
Definition: rectangles.h:34
bool is_visible() const
Definition: canonical_window_manager.cpp:169
CanonicalWindowManagerPolicy(Tools *const tools, std::shared_ptr< shell::DisplayLayout > const &display_layout)
Definition: canonical_window_manager.cpp:183
mir::optional_value< geometry::DeltaY > height_inc
Definition: canonical_window_manager.h:70
MirSurfaceType type
Definition: canonical_window_manager.h:59
geometry::Width max_width
Definition: canonical_window_manager.h:67
int handle_set_state(std::shared_ptr< scene::Surface > const &surface, MirSurfaceState value)
Definition: canonical_window_manager.cpp:518
mir::optional_value< SurfaceAspectRatio > max_aspect
Definition: canonical_window_manager.h:72
Definition: canonical_window_manager.h:83
bool handle_touch_event(MirTouchEvent const *event)
Definition: canonical_window_manager.cpp:684
void drag(geometry::Point cursor)
Definition: canonical_window_manager.cpp:603
geometry::Height max_height
Definition: canonical_window_manager.h:68
mir::optional_value< geometry::DeltaX > width_inc
Definition: canonical_window_manager.h:69
void handle_session_info_updated(CanonicalSessionInfoMap &session_info, geometry::Rectangles const &displays)
Definition: canonical_window_manager.cpp:199
Definition: canonical_window_manager.h:37
CanonicalSurfaceInfo(std::shared_ptr< scene::Session > const &session, std::shared_ptr< scene::Surface > const &surface, scene::SurfaceCreationParameters const ¶ms)
Definition: canonical_window_manager.cpp:76
bool can_be_active() const
Definition: canonical_window_manager.cpp:96
std::weak_ptr< scene::Surface > parent
Definition: canonical_window_manager.h:63
mir::optional_value< SurfaceAspectRatio > min_aspect
Definition: canonical_window_manager.h:71
std::weak_ptr< scene::Session > session
Definition: canonical_window_manager.h:62
bool must_have_parent() const
Definition: canonical_window_manager.cpp:117
bool handle_pointer_event(MirPointerEvent const *event)
Definition: canonical_window_manager.cpp:727
bool can_morph_to(MirSurfaceType new_type) const
Definition: canonical_window_manager.cpp:122
A policy based window manager. This takes care of the management of any meta implementation held for ...
Definition: basic_window_manager.h:105
void handle_displays_updated(CanonicalSessionInfoMap &session_info, geometry::Rectangles const &displays)
Definition: canonical_window_manager.cpp:203
int surfaces
Definition: canonical_window_manager.h:34
geometry::Rectangle restore_rect
Definition: canonical_window_manager.h:61
void resize(geometry::Point cursor)
Definition: canonical_window_manager.cpp:208
std::map< std::weak_ptr< scene::Surface >, Info, std::owner_less< std::weak_ptr< scene::Surface >>> type
Definition: basic_window_manager.h:39
void click(geometry::Point cursor)
Definition: canonical_window_manager.cpp:191
bool must_not_have_parent() const
Definition: canonical_window_manager.cpp:164
Definition: surface_creation_parameters.h:42
Definition: rectangle.h:33
geometry::Width min_width
Definition: canonical_window_manager.h:65
bool handle_keyboard_event(MirKeyboardEvent const *event)
Definition: canonical_window_manager.cpp:610
void handle_new_surface(std::shared_ptr< scene::Session > const &session, std::shared_ptr< scene::Surface > const &surface)
Definition: canonical_window_manager.cpp:368
std::vector< std::weak_ptr< scene::Surface > > children
Definition: canonical_window_manager.h:64
Specification of surface properties requested by client.
Definition: surface_specification.h:50
auto handle_place_new_surface(std::shared_ptr< scene::Session > const &session, scene::SurfaceCreationParameters const &request_parameters) -> scene::SurfaceCreationParameters
Definition: canonical_window_manager.cpp:215
void handle_modify_surface(std::shared_ptr< scene::Session > const &session, std::shared_ptr< scene::Surface > const &surface, SurfaceSpecification const &modifications)
Definition: canonical_window_manager.cpp:391
typename SurfaceTo< CanonicalSurfaceInfo >::type CanonicalSurfaceInfoMap
Definition: canonical_window_manager.h:88
MirSurfaceState state
Definition: canonical_window_manager.h:60
std::map< std::weak_ptr< scene::Session >, Info, std::owner_less< std::weak_ptr< scene::Session >>> type
Definition: basic_window_manager.h:45