Class MinimalWindowManager

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class MinimalWindowManager : public miral::WindowManagementPolicy

Minimal implementation of a floating window management policy.


Since MirAL 2.5

Subclassed by FloatingWindowManagerPolicy

Public Functions

explicit MinimalWindowManager(WindowManagerTools const &tools)
MinimalWindowManager(WindowManagerTools const &tools, MirInputEventModifier pointer_drag_modifier)

Allows shells to change the modifer used to identify a window drag gesture The default is mir_input_event_modifier_alt.


Since MirAL 3.7

virtual auto place_new_window(ApplicationInfo const &app_info, WindowSpecification const &requested_specification) -> WindowSpecification override

Honours the requested specification.

virtual void handle_window_ready(WindowInfo &window_info) override

If the window can have focus it is given focus.

virtual void handle_modify_window(WindowInfo &window_info, WindowSpecification const &modifications) override

Honours the requested modifications.

virtual void handle_raise_window(WindowInfo &window_info) override

Gives focus to the requesting window (tree)

virtual auto confirm_placement_on_display(WindowInfo const &window_info, MirWindowState new_state, Rectangle const &new_placement) -> Rectangle override

Honours the requested placement.

virtual bool handle_keyboard_event(MirKeyboardEvent const *event) override

Handles Alt-Tab, Alt-Grave and Alt-F4.

virtual bool handle_touch_event(MirTouchEvent const *event) override

Handles touch to focus.

virtual bool handle_pointer_event(MirPointerEvent const *event) override

Handles pre-existing move & resize gestures, plus click to focus.

virtual void handle_request_move(WindowInfo &window_info, MirInputEvent const *input_event) override

Initiates a move gesture (only implemented for pointers)

virtual void handle_request_resize(WindowInfo &window_info, MirInputEvent const *input_event, MirResizeEdge edge) override

Initiates a resize gesture (only implemented for pointers)

virtual auto confirm_inherited_move(WindowInfo const &window_info, Displacement movement) -> Rectangle override

Honours the requested movement.

virtual void advise_focus_gained(WindowInfo const &window_info) override

Raises newly focused window.

virtual void advise_focus_lost(WindowInfo const &window_info) override

Notification that a window has lost focus.


window_info – the window

virtual void advise_new_app(miral::ApplicationInfo &app_info) override

Notification that a new application has connected.


application – the application

virtual void advise_delete_app(miral::ApplicationInfo const &app_info) override

Notification that an application has disconnected.


application – the application

virtual void advise_new_window(WindowInfo const &app_info) override


Since MirAL 5.0

virtual void advise_delete_window(WindowInfo const &app_info) override


Since MirAL 5.0

Protected Functions

bool begin_pointer_move(WindowInfo const &window_info, MirInputEvent const *input_event)
bool begin_pointer_resize(WindowInfo const &window_info, MirInputEvent const *input_event, MirResizeEdge const &edge)
bool begin_touch_move(WindowInfo const &window_info, MirInputEvent const *input_event)
bool begin_touch_resize(WindowInfo const &window_info, MirInputEvent const *input_event, MirResizeEdge const &edge)

Protected Attributes

WindowManagerTools tools