Class KioskWindowManagerPolicy

Inheritance Relationships

Base Type

Class Documentation

class KioskWindowManagerPolicy : public miral::CanonicalWindowManagerPolicy

Public Functions

KioskWindowManagerPolicy(miral::WindowManagerTools const &tools, std::shared_ptr<SplashSession> const&)
virtual auto place_new_window(miral::ApplicationInfo const &app_info, miral::WindowSpecification const &request) -> miral::WindowSpecification override

Customize initial window placement.

Parameters:
  • app_info – the application requesting a new window

  • requested_specification – the requested specification (updated with default placement)

Returns:

the customized specification

virtual void advise_focus_gained(miral::WindowInfo const &info) override

Notification that a window has gained focus.

Parameters:

window_info – the window

virtual bool handle_keyboard_event(MirKeyboardEvent const *event) override

keyboard event handler

Parameters:

event – the event

Returns:

whether the policy has consumed the event

virtual bool handle_touch_event(MirTouchEvent const *event) override

touch event handler

Parameters:

event – the event

Returns:

whether the policy has consumed the event

virtual bool handle_pointer_event(MirPointerEvent const *event) override

pointer event handler

Parameters:

event – the event

Returns:

whether the policy has consumed the event

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

request from client to modify the window specification.

Parameters:
  • window_info – the window

  • modifications – the requested changes

Note

the request has already been validated against the type definition

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

request from client to initiate move

Parameters:
  • window_info – the window

  • input_event – the requesting event

Note

the request has already been validated against the requesting event

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

request from client to initiate resize

Parameters:
  • window_info – the window

  • input_event – the requesting event

  • edge – the edge(s) being dragged

Note

the request has already been validated against the requesting event

virtual Rectangle confirm_placement_on_display(const miral::WindowInfo &window_info, MirWindowState new_state, Rectangle const &new_placement) override

Confirm (and optionally adjust) the placement of a window on the display.

Called when (re)placing fullscreen, maximized, horizontally maximised and vertically maximized windows to allow adjustment for decorations.

Parameters:
  • window_info – the window

  • new_state – the new state

  • new_placement – the suggested placement

Returns:

the confirmed placement of the window