Class CanonicalWindowManagerPolicy¶
Defined in File canonical_window_manager.h
Inheritance Relationships¶
Base Type¶
public miral::WindowManagementPolicy(Class WindowManagementPolicy)
Derived Types¶
public miral::FloatingWindowManager(Class FloatingWindowManager)public miral::KioskWindowManagerPolicy(Class KioskWindowManagerPolicy)
Class Documentation¶
-
class CanonicalWindowManagerPolicy : public miral::WindowManagementPolicy¶
Widely accepted defaults for window management.
Subclassed by miral::FloatingWindowManager, miral::KioskWindowManagerPolicy
Public Functions
-
explicit CanonicalWindowManagerPolicy(WindowManagerTools const &tools)¶
-
virtual WindowSpecification place_new_window(ApplicationInfo const &app_info, WindowSpecification const &request_parameters) override¶
Given the
app_infoandrequested_specification, this method returns a new miral::WindowSpecification that defines how the new window should be placed.This method is called before advise_new_window.
- Parameters:
app_info – the application requesting a new window
requested_specification – the requested specification with a default position and size
- Returns:
the customized placement
-
virtual void handle_window_ready(WindowInfo &window_info) override¶
Tries to focus on the newly ready window.
-
virtual void handle_modify_window(WindowInfo &window_info, WindowSpecification const &modifications) override¶
Applies the requested modifications.
-
virtual void handle_activate_window(WindowInfo &window_info) override¶
Tries to focus the activated window.
-
virtual void advise_focus_gained(WindowInfo const &info) override¶
Raises the window (and any children).
-
virtual Rectangle confirm_inherited_move(WindowInfo const &window_info, Displacement movement) override¶
Move the child window with the parent.
-
virtual Rectangle confirm_placement_on_display(WindowInfo const &window_info, MirWindowState new_state, Rectangle const &new_placement) override¶
Confirm and optionally adjust the placement of a window on the display.
This is called when placing a fullscreen, maximized, horizontally maximized, and vertically maximized window to allow adjustment for decorations.
If the author wishes to do nothing in response, they may simply return
new_placement.- Parameters:
window_info – the window
new_state – the new state
new_placement – the suggested placement
- Returns:
the final placement
Protected Attributes
-
WindowManagerTools tools¶
-
explicit CanonicalWindowManagerPolicy(WindowManagerTools const &tools)¶